Skip to content
Commit db049866 authored by Michal Wilczynski's avatar Michal Wilczynski Committed by Jassi Brar
Browse files

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: 5d4d263e ("mailbox: Introduce support for T-head TH1520 Mailbox driver")
Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/a99e72be-8490-4960-ad26-cbfef6af238f@stanley.mountain/


Signed-off-by: default avatarMichal Wilczynski <m.wilczynski@samsung.com>
Signed-off-by: default avatarJassi Brar <jassisinghbrar@gmail.com>
parent 170a264d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment