Re: [PATCH 7/7] dmaengine: ste_dma40: synchronize tasklet when releasing a channel

From: Frank Li

Date: Fri Nov 13 2026 - 16:06:11 EST


On Sun, Oct 18, 2026 at 12:07:23PM +0800, Jiale Yao wrote:
> DMA completion handling schedules a per-channel tasklet that processes
> completed descriptors and invokes client callbacks. Channel release
> terminates and frees the descriptor state without draining a tasklet
> that was already queued.
>
> After d40_free_dma() removes the channel from the interrupt lookup
> tables, kill the tasklet before returning the channel to the DMAengine
> core.
>
> Fixes: 8d318a50b3d7 ("DMAENGINE: Support for ST-Ericssons DMA40 block v3")
> Signed-off-by: Jiale Yao <yaojiale02@xxxxxxx>
> ---

Reviewed-by: Frank Li <Frank.Li@xxxxxxx>

> drivers/dma/ste_dma40.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
> index 0d9ffa3e2663..647a265590c2 100644
> --- a/drivers/dma/ste_dma40.c
> +++ b/drivers/dma/ste_dma40.c
> @@ -2484,6 +2484,8 @@ static void d40_free_chan_resources(struct dma_chan *chan)
> if (err)
> chan_err(d40c, "Failed to free channel\n");
> spin_unlock_irqrestore(&d40c->lock, flags);
> +
> + tasklet_kill(&d40c->tasklet);
> }
>
> static struct dma_async_tx_descriptor *d40_prep_memcpy(struct dma_chan *chan,
> --
> 2.34.1
>