aboutsummaryrefslogtreecommitdiff
path: root/tools/lib/api/fs/tracing_path.c
diff options
context:
space:
mode:
authorManivannan Sadhasivam <[email protected]>2023-01-23 12:59:45 +0530
committerManivannan Sadhasivam <[email protected]>2023-01-27 12:31:41 +0530
commit1ddc7618294084fff8d673217a9479550990ee84 (patch)
treea1c166517bd8d83b03148acd64d76d7d0cbf551a /tools/lib/api/fs/tracing_path.c
parent8a1c24bb908f9ecbc4be0fea014df67d43161551 (diff)
bus: mhi: ep: Change state_lock to mutex
state_lock, the spinlock type is meant to protect race against concurrent MHI state transitions. In mhi_ep_set_m0_state(), while the state_lock is being held, the channels are resumed in mhi_ep_resume_channels() if the previous state was M3. This causes sleeping in atomic bug, since mhi_ep_resume_channels() use mutex internally. Since the state_lock is supposed to be held throughout the state change, it is not ideal to drop the lock before calling mhi_ep_resume_channels(). So to fix this issue, let's change the type of state_lock to mutex. This would also allow holding the lock throughout all state transitions thereby avoiding any potential race. Cc: <[email protected]> # 5.19 Fixes: e4b7b5f0f30a ("bus: mhi: ep: Add support for suspending and resuming channels") Reported-by: Dan Carpenter <[email protected]> Reviewed-by: Jeffrey Hugo <[email protected]> Signed-off-by: Manivannan Sadhasivam <[email protected]>
Diffstat (limited to 'tools/lib/api/fs/tracing_path.c')
0 files changed, 0 insertions, 0 deletions