aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCarlos Song <carlos.song@nxp.com>2026-05-25 14:23:57 +0800
committerMark Brown <broonie@kernel.org>2026-06-01 15:08:06 +0100
commit01980b5da56e573d62798d0ff6c86bcaa2b22cbe (patch)
tree33913e59215109ae36941e4711c1f73f29a39300 /include
parente703ce47691b967fe9b4057fb1d062273211afa9 (diff)
spi: fsl-lpspi: terminate the RX channel on TX prepare failure path
When dmaengine_prep_slave_sg() fails for the TX channel, the error path terminates the TX DMA channel but leaves the RX channel running. Since the RX channel was already submitted and issued prior to preparing the TX descriptor, returning -EINVAL causes the SPI core to unmap the DMA buffers while the RX DMA engine continues writing to them, leading to potential memory corruption or use-after-free. Terminate the RX channel before returning on the TX prepare failure path. Fixes: 09c04466ce7e ("spi: lpspi: add dma mode support") Cc: stable@vger.kernel.org Signed-off-by: Carlos Song <carlos.song@nxp.com> Link: https://patch.msgid.link/20260525062357.3191349-3-carlos.song@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions