[PATCHv2] dmaengine: fsldma: kill tasklet before removing channel

From: Rosen Penev

Date: Thu Sep 10 2026 - 16:31:05 EST


Add tasklet_kill() in fsl_dma_chan_remove() to prevent a race where the
tasklet is scheduled by the IRQ handler and runs after the channel has been
freed.

Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
---
v2: split from series and wrap at 75 characters
drivers/dma/fsldma.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 6ce0e5668dc2..5eca8ab23564 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -1207,6 +1207,7 @@ static int fsl_dma_chan_probe(struct fsldma_device *fdev,

static void fsl_dma_chan_remove(struct fsldma_chan *chan)
{
+ tasklet_kill(&chan->tasklet);
irq_dispose_mapping(chan->irq);
list_del(&chan->common.device_node);
iounmap(chan->regs);
--
2.55.0