BACKPORT: FROMLIST: scsi: ufs: core: Fix data race in CPU latency PM QoS request handling
The cpu_latency_qos_add/remove/update_request interfaces lack internal synchronization by design, requiring the caller to ensure thread safety. The current implementation relies on the flag, which is insufficient to prevent concurrent access and cannot serve as a proper synchronization mechanism. This has led to data races and list corruption issues. Signed-off-by:Zhongqiu Han <zhongqiu.han@oss.qualcomm.com> Reviewed-by:
Bart Van Assche <bvanassche@acm.org> Bug: 445829420 Link: https://lore.kernel.org/all/20250917094143.88055-1-zhongqiu.han@oss.qualcomm.com/ Change-Id: Ibff3dce3661ff83b46b6efe6bfbcd43eaa97b804 [Yuanchao Xia: Refactored the patch based on Bart's suggestion to preserve KMI by Use to_hba_priv() where necessary to convert the hba pointer into a struct ufs_hba_priv pointer.] Signed-off-by:
Yuanchao Xia <xiayuanchao@vivo.corp-partner.google.com>
Loading