Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] dmaengine: Kill channel tasklets in remove again
@ 2026-11-23  0:53 Suyuan Wang via B4 Relay
  2026-11-23  0:53 ` [PATCH 1/2] dmaengine: at_xdmac: Kill the " Suyuan Wang via B4 Relay
  2026-11-23  0:53 ` [PATCH 2/2] dmaengine: idma64: " Suyuan Wang via B4 Relay
  0 siblings, 2 replies; 4+ messages in thread
From: Suyuan Wang via B4 Relay @ 2026-11-23  0:53 UTC (permalink / raw)
  To: vkoul, ludovic.desroches
  Cc: linux-arm-kernel, linux-kernel, Frank.Li, allen.lkml, dave.jiang,
	dmaengine, andriy.shevchenko

at_xdmac and idma64 kill their channel tasklets in remove() with a loop
over dma.chancnt after dma_async_device_unregister(). Since commit
e81274cd6b52, dma_async_device_unregister() unregisters each channel
and decrements dma.chancnt for it, so chancnt is 0 when the loops run,
they do nothing, and a tasklet scheduled by an interrupt can run after
the devm-allocated driver data is gone. Both patches read the count
before unregistering.

These loops are also touched by Allen's "dmaengine: migrate channel
tasklets to WQ_BH" series (v4, 01/33 and 04/33), which keeps the
chancnt bound. The two fixes don't depend on that series; they make the
current tasklet cleanup work again. Whichever goes in second needs a
trivial rebase.

Found with a static analysis tool and checked by hand. Compile tested
on x86_64 with COMPILE_TEST (W=1); I don't have the hardware.

---
Suyuan Wang (2):
      dmaengine: at_xdmac: Kill the channel tasklets in remove again
      dmaengine: idma64: Kill the channel tasklets in remove again

 drivers/dma/at_xdmac.c | 4 +++-
 drivers/dma/idma64.c   | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-23  9:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23  0:53 [PATCH 0/2] dmaengine: Kill channel tasklets in remove again Suyuan Wang via B4 Relay
2026-11-23  0:53 ` [PATCH 1/2] dmaengine: at_xdmac: Kill the " Suyuan Wang via B4 Relay
2026-11-23  0:53 ` [PATCH 2/2] dmaengine: idma64: " Suyuan Wang via B4 Relay
2026-11-23  9:47   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox