diff options
author | Qiang Yu <quic_qianyu@quicinc.com> | 2022-10-16 06:05:32 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-18 13:44:55 +0300 |
commit | ab9bb65b851973fd7843f83830e4ed518d9e213b (patch) | |
tree | 287c84537cb97b7a7b99aa8d3b1c4b9e81745023 /scripts/headers_check.pl | |
parent | 6c9e2c11c33c35563d34d12b343d43b5c12200b5 (diff) | |
download | linux-ab9bb65b851973fd7843f83830e4ed518d9e213b.tar.xz |
bus: mhi: host: Fix race between channel preparation and M0 event
[ Upstream commit 869a99907faea6d1835b0bd0d0422ae3519c6ea9 ]
There is a race condition where mhi_prepare_channel() updates the
read and write pointers as the base address and in parallel, if
an M0 transition occurs, the tasklet goes ahead and rings
doorbells for all channels with a delta in TRE rings assuming
they are already enabled. This causes a null pointer access. Fix
it by adding a channel enabled check before ringing channel
doorbells.
Cc: stable@vger.kernel.org # 5.19
Fixes: a6e2e3522f29 "bus: mhi: core: Add support for PM state transitions"
Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://lore.kernel.org/r/1665889532-13634-1-git-send-email-quic_qianyu@quicinc.com
[mani: CCed stable list]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts/headers_check.pl')
0 files changed, 0 insertions, 0 deletions