linux-stable/drivers/bus/mhi
Qiang Yu 01bd694ac2 bus: mhi: host: Drop chan lock before queuing buffers
Ensure read and write locks for the channel are not taken in succession by
dropping the read lock from parse_xfer_event() such that a callback given
to client can potentially queue buffers and acquire the write lock in that
process. Any queueing of buffers should be done without channel read lock
acquired as it can result in multiple locks and a soft lockup.

Cc: <stable@vger.kernel.org> # 5.7
Fixes: 1d3173a3ba ("bus: mhi: core: Add support for processing events from client device")
Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Tested-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/1702276972-41296-3-git-send-email-quic_qianyu@quicinc.com
[mani: added fixes tag and cc'ed stable]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2023-12-16 10:54:29 +05:30
..
ep bus: mhi: ep: Add checks for read/write callbacks while registering controllers 2023-12-15 14:20:13 +05:30
host bus: mhi: host: Drop chan lock before queuing buffers 2023-12-16 10:54:29 +05:30
Kconfig bus: mhi: ep: Add support for registering MHI endpoint controllers 2022-04-26 13:17:40 +02:00
Makefile bus: mhi: Update Makefile to used Kconfig flags 2023-01-27 12:30:53 +05:30
common.h bus: mhi: ep: Add support for sending events to the host 2022-04-26 13:17:41 +02:00