lkml.org 
[lkml]   [2004]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: 2.6.6 Oops disconnecting speedtouch usb modem
Date
> I don't see how that can be.  The stack dump is getting unwieldy so I
> haven't duplicated it here, but if I'm reading it right the problem occurs
> when usb_set_interface() is called by usb_unbind_interface(), which itself
> is called indirectly by device_unregister() above. The pointer for the
> interface being unregistered has not yet been set to NULL, hence this
> shouldn't cause an oops.

No, but the pointer for another (previous) interface may just have been
set to NULL, causing an Oops when usb_ifnum_to_if loops over all
interfaces. In other words, maybe

for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
struct usb_interface *interface;

/* remove this interface */
interface = dev->actconfig->interface[i];
dev_dbg (&dev->dev, "unregistering interface %s\n",
interface->dev.bus_id);
device_unregister (&interface->dev);
dev->actconfig->interface[i] = NULL;
}

should be turned into

for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
struct usb_interface *interface;

/* remove this interface */
interface = dev->actconfig->interface[i];
dev_dbg (&dev->dev, "unregistering interface %s\n",
interface->dev.bus_id);
device_unregister (&interface->dev);
}
for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++)
dev->actconfig->interface[i] = NULL;

All the best,

Duncan.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.073 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site