]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
bus: mhi: ep: Add missing state_lock protection for mhi_state access
authorSumit Kumar <sumit.kumar@oss.qualcomm.com>
Tue, 14 Apr 2026 06:29:41 +0000 (11:59 +0530)
committerManivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Tue, 12 May 2026 14:30:53 +0000 (20:00 +0530)
commitce3e534ee9c8d13a68c8a611c3b7bd0c2152d2ab
tree47b39b6424841aa0014beaf730709bab02818ad3
parent9dece4435d396e9877e27483552b910ba8654169
bus: mhi: ep: Add missing state_lock protection for mhi_state access

The mhi_cntrl->mhi_state field should be protected by state_lock to
ensure atomic state transitions. However, mhi_ep_power_up() access
mhi_state without holding this lock, which can race with concurrent state
transitions and lead to state corruption.

Add proper state_lock protection around mhi_state access.

Fixes: fb3a26b7e8af ("bus: mhi: ep: Add support for powering up the MHI endpoint stack")
Fixes: f7d0806bdb1b3 ("bus: mhi: ep: Add support for handling SYS_ERR condition")
Signed-off-by: Sumit Kumar <sumit.kumar@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260414-reset_worker_deadlock-v2-2-42fd682b45db@oss.qualcomm.com
drivers/bus/mhi/ep/main.c