When ohci-hcd is shutting down (for rmmod or PC-card removal), there is
a window when the device is shut down, HC communication area (->hcca)
is freed, but the core has not called "free_irq" yet. If another device
triggers a shared interrupt in this window, we oops when trying to
access the freed ->hcca.
This patch removes the window by calling free_irq before ->hcca is freed.
The patch is tested at the PC hotplug test rig at Stratus, and with
rmmod by Rafael Wysocki.
Signed-off-by: Pete Zaitcev <[EMAIL PROTECTED]>
Signed-off-by: David Brownell <[EMAIL PROTECTED]>
diff -urp -X dontdiff linux-2.6.18-rc6/drivers/usb/host/ohci-hcd.c
linux-2.6.18-rc6-lem/drivers/usb/host/ohci-hcd.c
--- linux-2.6.18-rc6/drivers/usb/host/ohci-hcd.c 2006-09-06
21:56:32.000000000 -0700
+++ linux-2.6.18-rc6-lem/drivers/usb/host/ohci-hcd.c 2006-09-14
22:48:15.000000000 -0700
@@ -775,7 +775,9 @@ static void ohci_stop (struct usb_hcd *h
ohci_usb_reset (ohci);
ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
-
+ free_irq(hcd->irq, hcd);
+ hcd->irq = -1;
+
remove_debug_files (ohci);
unregister_reboot_notifier (&ohci->reboot_notifier);
ohci_mem_cleanup (ohci);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel