diff options
author | Fei Shao <fshao@chromium.org> | 2024-03-21 15:08:57 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-03-21 11:28:21 +0000 |
commit | a20ad45008a7c82f1184dc6dee280096009ece55 (patch) | |
tree | b8c512981fb37efb39ca9643c8d9c16b4984cbeb /drivers/opp | |
parent | 2ff0573e7aff5129d73ec5c3159cd84d862cb1cc (diff) | |
download | linux-stable-a20ad45008a7c82f1184dc6dee280096009ece55.tar.gz linux-stable-a20ad45008a7c82f1184dc6dee280096009ece55.tar.bz2 linux-stable-a20ad45008a7c82f1184dc6dee280096009ece55.zip |
spi: spi-mt65xx: Fix NULL pointer access in interrupt handler
The TX buffer in spi_transfer can be a NULL pointer, so the interrupt
handler may end up writing to the invalid memory and cause crashes.
Add a check to trans->tx_buf before using it.
Fixes: 1ce24864bff4 ("spi: mediatek: Only do dma for 4-byte aligned buffers")
Signed-off-by: Fei Shao <fshao@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://msgid.link/r/20240321070942.1587146-2-fshao@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/opp')
0 files changed, 0 insertions, 0 deletions