summaryrefslogtreecommitdiffstats
path: root/scripts/ver_linux
diff options
context:
space:
mode:
authorChristian Lugnberg <christian.lugnberg@soundtrack.io>2026-08-17 15:51:23 +0200
committerVinod Koul <vkoul@kernel.org>2026-09-10 17:57:46 +0530
commit9096bdc8d930147f7c39a493a859acbd3a8485d8 (patch)
tree7ed62afe90f3f99a7d930b38dd4bb4f1f5128ead /scripts/ver_linux
parentc90b6973daa37f4c283342dff881ae001dea4fe6 (diff)
downloadlinux-stable-9096bdc8d930147f7c39a493a859acbd3a8485d8.tar.gz
linux-stable-9096bdc8d930147f7c39a493a859acbd3a8485d8.zip
dmaengine: sun6i: fix undefined behaviour in sun6i_dma_tx_status
sun6i_dma_tx_status() calls vchan_find_desc() to look up the virtual descriptor for a given cookie, before checking whether the pointer vd is NULL: vd = vchan_find_desc(&vchan->vc, cookie); txd = to_sun6i_desc(&vd->tx); /* vd may be NULL here */ if (vd) { for (lli = txd->v_lli; ...) vchan_find_desc() returns NULL when the descriptor has already been completed or is in-flight on a physical channel and no longer present in the virtual channel's descriptor list. When vd is NULL, to_sun6i_desc() is called unconditionally on &vd->tx before the NULL check, which is undefined behaviour. Move the call inside the if (vd) guard to ensure it is only reached with a valid pointer. vd = vchan_find_desc(&vchan->vc, cookie); if (vd) { struct sun6i_desc *txd = to_sun6i_desc(&vd->tx); for (lli = txd->v_lli; ...) Fixes: 555859308723 ("dmaengine: sun6i: Add driver for the Allwinner A31 DMA controller") Cc: stable@vger.kernel.org Assisted-by: Claude:claude-sonnet-4-6 Signed-off-by: Christian Lugnberg <christian.lugnberg@soundtrack.io> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260817135723.12807-3-christian.lugnberg@soundtrack.io Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'scripts/ver_linux')
0 files changed, 0 insertions, 0 deletions