public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hci-usb bugfix
@ 2004-05-09 19:47 Sebastian Schmidt
  2004-05-09 20:39 ` Marcel Holtmann
  2004-05-09 22:37 ` Soeren Sonnenburg
  0 siblings, 2 replies; 20+ messages in thread
From: Sebastian Schmidt @ 2004-05-09 19:47 UTC (permalink / raw)
  To: linux-kernel

Hi,

this is a little patch against 2.6.6-rc3 which fixes the Oops when
unplugging an USB Bluetooth device.

hci_usb_disconnect() got called recursively which caused
sysfs_hash_and_remove() finally to dereference a NULL pointer.

--- SNIP ---
diff -uNr linux-2.6.6-rc3.old/drivers/bluetooth/hci_usb.c linux-2.6.6-rc3/drivers/bluetooth/hci_usb.c
--- linux-2.6.6-rc3.old/drivers/bluetooth/hci_usb.c     2004-05-09 20:25:00.000000000 +0200
+++ linux-2.6.6-rc3/drivers/bluetooth/hci_usb.c 2004-05-09 20:28:30.000000000 +0200
@@ -986,8 +986,21 @@

        hci_usb_close(hdev);

-       if (husb->isoc_iface)
+       if (husb->isoc_iface) {
+#if 0
                usb_driver_release_interface(&hci_usb_driver, husb->isoc_iface);
+#else
+               /* do the same as usb_driver_release_interface would do,
+                * except calling diconnect().
+                * usb_driver_release_interface() _does_ check if
+                *  are in disconnect() or add, but I really dunno 
+                *  where dev->driver_list or dev->bus_list gets set.
+                *      -- yath
+                */
+               husb->isoc_iface->dev.driver = NULL;
+               usb_set_intfdata(husb->isoc_iface, NULL);
+#endif
+       }

        if (hci_unregister_dev(hdev) < 0)
                BT_ERR("Can't unregister HCI device %s", hdev->name);
--- SNAP ---

Please apply it,

Sebastian


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

end of thread, other threads:[~2004-05-12 13:17 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-09 19:47 [PATCH] hci-usb bugfix Sebastian Schmidt
2004-05-09 20:39 ` Marcel Holtmann
2004-05-10 16:13   ` Alan Stern
2004-05-10 16:19     ` Marcel Holtmann
2004-05-10 16:36       ` Oliver Neukum
2004-05-10 16:52         ` Marcel Holtmann
2004-05-10 19:15           ` Oliver Neukum
2004-05-10 19:39             ` Marcel Holtmann
2004-05-10 20:38               ` Oliver Neukum
2004-05-10 20:58                 ` Marcel Holtmann
2004-05-10 17:19       ` Alan Stern
2004-05-10 17:27         ` Marcel Holtmann
2004-05-10 17:52           ` Alan Stern
2004-05-10 18:07             ` Marcel Holtmann
2004-05-11 14:59               ` Alan Stern
2004-05-12 13:13                 ` Marcel Holtmann
2004-05-09 22:37 ` Soeren Sonnenburg
2004-05-10 10:40   ` Marcel Holtmann
2004-05-11  7:30     ` Soeren Sonnenburg
2004-05-12 13:15       ` Marcel Holtmann

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