mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
dmaengine: mv_xor: kill tasklet on channel add error path
If request_irq() succeeds but a later step (self-test or device
registration) fails, the error path at err_free_irq frees the IRQ
but does not kill the tasklet. A previously scheduled tasklet can
still run after the channel is freed, accessing freed memory.
Add tasklet_kill() after free_irq() on the error path.
Fixes: ff7b04796d ("dmaengine: DMA engine driver for Marvell XOR engine")
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260909234601.101883-1-rosenp@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
6ad1b49cc3
commit
bcb4d469b1
|
|
@ -1167,6 +1167,7 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
|
|||
|
||||
err_free_irq:
|
||||
free_irq(mv_chan->irq, mv_chan);
|
||||
tasklet_kill(&mv_chan->irq_tasklet);
|
||||
err_free_dma:
|
||||
dma_free_wc(&pdev->dev, MV_XOR_POOL_SIZE,
|
||||
mv_chan->dma_desc_pool_virt, mv_chan->dma_desc_pool);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user