linux-stable/drivers/bus
Qiang Yu ebc1e81390 bus: mhi: host: Fix race between channel preparation and M0 event
commit 869a99907f upstream.

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: a6e2e3522f "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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-07 11:15:58 +01:00
..
fsl-mc bus: fsl-mc-bus: fix KASAN use-after-free in fsl_mc_bus_remove() 2022-06-10 15:53:12 +02:00
mhi bus: mhi: host: Fix race between channel preparation and M0 event 2023-01-07 11:15:58 +01:00
Kconfig bus: add driver for initializing the SSC bus on (some) qcom SoCs 2022-04-19 13:03:57 -05:00
Makefile bus: add driver for initializing the SSC bus on (some) qcom SoCs 2022-04-19 13:03:57 -05:00
arm-cci.c
arm-integrator-lm.c
brcmstb_gisb.c bus: brcmstb_gisb: Remove the suppress_bind_attrs attribute of the driver 2022-04-26 09:12:45 -07:00
bt1-apb.c bus: bt1-apb: Don't print error on -EPROBE_DEFER 2022-06-14 12:21:44 +02:00
bt1-axi.c bus: bt1-axi: Don't print error on -EPROBE_DEFER 2022-06-14 12:21:44 +02:00
da8xx-mstpri.c
hisi_lpc.c hisi_lpc: Use acpi_dev_for_each_child() 2022-07-01 21:19:29 +02:00
imx-weim.c bus: imx-weim: make symbol 'weim_of_notifier' static 2022-04-11 16:04:53 +08:00
intel-ixp4xx-eb.c bus: ixp4xx: Don't touch bit 7 on IXP42x 2022-12-02 17:43:11 +01:00
mips_cdmm.c mips: cdmm: Fix refcount leak in mips_cdmm_phys_base 2022-03-14 15:01:51 +01:00
moxtet.c spi: make remove callback a void function 2022-02-09 13:00:45 +00:00
mvebu-mbus.c SPDX changes for 6.0-rc1 2022-08-04 12:12:54 -07:00
omap-ocp2scp.c
omap_l3_noc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_320.RULE 2022-06-10 14:51:36 +02:00
omap_l3_noc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_320.RULE 2022-06-10 14:51:36 +02:00
omap_l3_smx.c
omap_l3_smx.h
qcom-ebi2.c bus: qcom-ebi2: Fix incorrect documentation for '{slow,fast}_cfg' 2021-05-26 21:19:23 -05:00
qcom-ssc-block-bus.c bus: add driver for initializing the SSC bus on (some) qcom SoCs 2022-04-19 13:03:57 -05:00
simple-pm-bus.c drivers: bus: simple-pm-bus: Add support for probing simple bus only devices 2021-10-05 17:47:15 +02:00
sun50i-de2.c bus: sun50i-de2: Adjust printing error message 2021-10-13 14:48:48 +02:00
sunxi-rsb.c bus: sunxi-rsb: Support atomic transfers 2022-12-02 17:43:03 +01:00
tegra-aconnect.c
tegra-gmi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 2) 2022-06-10 14:51:35 +02:00
ti-pwmss.c
ti-sysc.c Char / Misc / Other smaller driver subsystem updates for 5.19-rc1 2022-06-03 11:36:34 -07:00
ts-nbus.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 2) 2022-06-10 14:51:35 +02:00
uniphier-system-bus.c
vexpress-config.c