Re: [PATCH v2 2/2] dmaengine: idma64: Kill the channel tasklets in remove again
From: Wong Steve
Date: Mon Nov 23 2026 - 05:47:37 EST
> You have to wait a sensible time before resubmission.
> Look at the v1 and act accordingly.
Sorry, I sent v2 too quickly. Sashiko found a real problem in the
at_xdmac patch (1/2), and I resent the series without waiting for other
replies, so your Acked-by on v1 is missing.
This idma64 patch (2/2) is the same in v1 and v2. Vinod, could you take
Andy's tag from v1 when applying:
Acked-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
About marking chancnt __private: that makes sense to me, but it is a
change to the dmaengine core, so I'd keep it out of this fix.
I'll wait for more review before sending anything else.
Thanks,
Suyuan
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> 于2026年11月23日周一 17:49写道:
>
> On Mon, Nov 23, 2026 at 01:17:38AM +0000, Suyuan Wang via B4 Relay wrote:
> >
> > idma64_remove() frees the IRQ and then kills the channel tasklets, as
> > the comment there says, so that no tasklet scheduled by the interrupt
> > runs after removal:
> >
> > for (i = 0; i < idma64->dma.chancnt; i++) {
> > ...
> > tasklet_kill(&idma64c->vchan.task);
> > }
> >
> > Since commit e81274cd6b52 ("dmaengine: add support to dynamic
> > register/unregister of channels"), dma_async_device_unregister()
> > unregisters each channel and decrements dma.chancnt for it, so the
> > count is 0 when this loop runs and no tasklet is killed. A tasklet
> > scheduled by an interrupt can then run after the devm-allocated idma64
> > and its channels have been freed.
> >
> > Read the channel count before unregistering the device.
> >
> > Found with a static analysis tool and checked by hand.
>
> You have to wait a sensible time before resubmission.
> Look at the v1 and act accordingly.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>