linux/drivers/mailbox
Michal Wilczynski db04986694 mailbox: th1520: Fix memory corruption due to incorrect array size
The functions th1520_mbox_suspend_noirq and th1520_mbox_resume_noirq are
intended to save and restore the interrupt mask registers in the MBOX
ICU0. However, the array used to store these registers was incorrectly
sized, leading to memory corruption when accessing all four registers.

This commit corrects the array size to accommodate all four interrupt
mask registers, preventing memory corruption during suspend and resume
operations.

Fixes: 5d4d263e1c ("mailbox: Introduce support for T-head TH1520 Mailbox driver")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/a99e72be-8490-4960-ad26-cbfef6af238f@stanley.mountain/
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
2025-01-18 16:20:55 -06:00
..
Kconfig mailbox: add Samsung Exynos driver 2025-01-18 16:18:48 -06:00
Makefile mailbox: add Samsung Exynos driver 2025-01-18 16:18:48 -06:00
arm_mhu.c
arm_mhu_db.c
arm_mhuv2.c
arm_mhuv3.c
armada-37xx-rwtm-mailbox.c
bcm-flexrm-mailbox.c
bcm-pdc-mailbox.c
bcm2835-mailbox.c
exynos-mailbox.c mailbox: add Samsung Exynos driver 2025-01-18 16:18:48 -06:00
hi3660-mailbox.c
hi6220-mailbox.c
imx-mailbox.c
mailbox-altera.c
mailbox-mchp-ipc-sbi.c mailbox: add Microchip IPC support 2025-01-18 16:09:48 -06:00
mailbox-mpfs.c
mailbox-sti.c
mailbox-test.c
mailbox-th1520.c mailbox: th1520: Fix memory corruption due to incorrect array size 2025-01-18 16:20:55 -06:00
mailbox-xgene-slimpro.c
mailbox.c
mailbox.h
mtk-adsp-mailbox.c
mtk-cmdq-mailbox.c
omap-mailbox.c
pcc.c
pl320-ipc.c
platform_mhu.c
qcom-apcs-ipc-mailbox.c mailbox: qcom: Add support for IPQ5424 APCS IPC 2025-01-18 16:17:21 -06:00
qcom-cpucp-mbox.c
qcom-ipcc.c mailbox: qcom-ipcc: Reset CLEAR_ON_RECV_RD if set from boot firmware 2025-01-18 16:15:33 -06:00
rockchip-mailbox.c
sprd-mailbox.c
stm32-ipcc.c
sun6i-msgbox.c
tegra-hsp.c mailbox: tegra-hsp: Clear mailbox before using message 2025-01-18 16:05:34 -06:00
ti-msgmgr.c
zynqmp-ipi-mailbox.c mailbox: zynqmp: Remove invalid __percpu annotation in zynqmp_ipi_probe() 2025-01-18 16:20:21 -06:00