summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorPin-Hao Chen <billy920225@gmail.com>2026-10-06 06:05:28 +0800
committerMark Brown <broonie@kernel.org>2026-10-07 17:16:34 +0200
commit0c5b0c3eb1d6daa1117dacd32589196f52109cab (patch)
tree9e93e61ddb38b0ae612abd7cfc9f7550e3cc36e3 /tools/perf/scripts/python
parent2b083499271b799bcb3aaa9b98e278d7af5c092b (diff)
spi: stm32: fix double free of SRAM buffer on MDMA fallback
When the "rxm2m" MDMA channel cannot be obtained, the driver frees the SRAM buffer and falls back to DMA-only mode. However, sram_rx_buf is left pointing to the freed buffer. As a result, stm32_spi_unprepare_msg() may clear the released SRAM area, while stm32_spi_remove() or a later probe error path may free the buffer again, triggering BUG_ON() in gen_pool_free_owner(). The probe error path also checks sram_pool instead of sram_rx_buf. If the SRAM allocation failed and a later probe step fails, gen_pool_free() may therefore be called with an unallocated buffer. Clear sram_rx_buf after freeing it on the MDMA fallback path and use the buffer pointer to determine whether cleanup is needed. Fixes: d17dd2f1d8a1 ("spi: stm32: use STM32 DMA with STM32 MDMA to enhance DDR use") Cc: stable@vger.kernel.org Signed-off-by: Pin-Hao Chen <billy920225@gmail.com> Link: https://patch.msgid.link/20261005220528.7199-1-billy920225@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions