[PATCH v2 0/2] bus: mhi: ep: Fix state_lock protection issues

Sumit Kumar <[email protected]> Tue, 14 Apr 2026 11:59:39 +0530
Newsgroups dev.linux.lists.mhi,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel
Message-ID <20260414-reset_worker_deadlock-v2-0-42fd682b45db@oss.qualcomm.com>
This series fixes a deadlock in mhi_ep_reset_worker() where state_lock is
acquired twice, and adds missing lock protection for mhi_state access in
mhi_ep_power_up() to prevent race conditions and state machine corruption.

Signed-off-by: Sumit Kumar <[email protected]>
---
Changes in v2:
- Move `mhi_ep_mmio_reset()` out of state mutex lock.(Mani).
- Removed the mutex lock from `mhi_ep_handle_syserr()`, since the caller of
  mhi_ep_handle_syserr() holds the lock.(Mani)
- Link to v1: https://lore.kernel.org/r/20260203-reset_worker_deadlock-v1-0-7ed889b5bf19@oss.qualcomm.com

---
Sumit Kumar (2):
      bus: mhi: ep: Fix potential deadlock in mhi_ep_reset_worker()
      bus: mhi: ep: Add missing state_lock protection for mhi_state access

 drivers/bus/mhi/ep/main.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
---
base-commit: 6fa9041b7177f6771817b95e83f6df17b147c8c6
change-id: 20251113-reset_worker_deadlock-0223907f7c9d

Best regards,
-- 
Sumit Kumar <[email protected]>