Commit e6f3cb87 authored by Yuanchao Xia's avatar Yuanchao Xia Committed by Treehugger Robot
Browse files

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: default avatarZhongqiu Han <zhongqiu.han@oss.qualcomm.com>
Reviewed-by: default avatarBart 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: default avatarYuanchao Xia <xiayuanchao@vivo.corp-partner.google.com>
parent 8bd536ac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment