Linux USB
 help / color / mirror / Atom feed
* [PATCH] usb: host: fhci: drain completion tasklet during removal
@ 2026-10-28  4:57 Jiale Yao
  2026-10-28  5:06 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Jiale Yao @ 2026-10-28  4:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Anton Vorontsov, linux-usb, linux-kernel; +Cc: stable

The transfer confirmation path can queue process_done_task immediately
before the timer IRQ is freed.  free_irq() prevents new hard IRQ
handlers, but it does not drain a tasklet that was already queued.  The
tasklet can therefore access the FHCI schedule, timer, and HCD after the
remove path releases them.

Kill the tasklet after freeing the timer IRQ and before releasing the
resources it accesses.

Fixes: 236dd4d18f29 ("USB: Driver for Freescale QUICC Engine USB Host Controller")
Cc: stable@vger.kernel.org
Signed-off-by: Jiale Yao <yaojiale02@163.com>
---
 drivers/usb/host/fhci-hcd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c
index d572f0c1dffa..c3fd7f77a71f 100644
--- a/drivers/usb/host/fhci-hcd.c
+++ b/drivers/usb/host/fhci-hcd.c
@@ -757,6 +757,7 @@ static void fhci_remove(struct device *dev)
 
 	usb_remove_hcd(hcd);
 	free_irq(fhci->timer->irq, hcd);
+	tasklet_kill(fhci->process_done_task);
 	gtm_put_timer16(fhci->timer);
 	cpm_muram_free(cpm_muram_offset(fhci->pram));
 	for (j = 0; j < NUM_PINS; j++)
-- 
2.34.1


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

end of thread, other threads:[~2026-10-28  5:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-28  4:57 [PATCH] usb: host: fhci: drain completion tasklet during removal Jiale Yao
2026-10-28  5:06 ` sashiko-bot

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