The USB host controller interface does not have reference counts so it
is possible to remove a host controller module on the fly, leaving all sorts
of dangling callback hooks and potentially outstanding URB's. Also the sysfs
bus and device objects are not ref counted so any open file handles are a
problem as well.
Until some strong willed person fixes this, please apply this patch to prevent
user damage. It just prevents module unload.
diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
--- a/drivers/usb/host/ehci-hcd.c Tue Feb 3 11:27:41 2004
+++ b/drivers/usb/host/ehci-hcd.c Tue Feb 3 11:27:41 2004
@@ -1033,6 +1033,9 @@
sizeof (struct ehci_qh), sizeof (struct ehci_qtd),
sizeof (struct ehci_itd), sizeof (struct ehci_sitd));
+ /* FIXME: hcd interface and bus need proper ref counting */
+ __unsafe(THIS_MODULE);
+
return pci_module_init (&ehci_pci_driver);
}
module_init (init);
diff -Nru a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c
--- a/drivers/usb/host/ohci-pci.c Tue Feb 3 11:27:41 2004
+++ b/drivers/usb/host/ohci-pci.c Tue Feb 3 11:27:41 2004
@@ -381,6 +381,10 @@
printk (KERN_DEBUG "%s: block sizes: ed %Zd td %Zd\n", hcd_name,
sizeof (struct ed), sizeof (struct td));
+
+ /* FIXME: hcd interface and bus need proper ref counting */
+ __unsafe(THIS_MODULE);
+
return pci_module_init (&ohci_pci_driver);
}
module_init (ohci_hcd_pci_init);
diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
--- a/drivers/usb/host/uhci-hcd.c Tue Feb 3 11:27:41 2004
+++ b/drivers/usb/host/uhci-hcd.c Tue Feb 3 11:27:41 2004
@@ -2612,6 +2612,8 @@
if (retval)
goto init_failed;
+ /* FIXME: hcd interface and bus need proper ref counting */
+ __unsafe(THIS_MODULE);
return 0;
init_failed:
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel