Re: 2.6.6 Oops disconnecting speedtouch usb modem

From: Alan Stern
Date: Thu May 13 2004 - 10:57:04 EST


On Thu, 13 May 2004, Duncan Sands wrote:

> Hi Nuno, I suspect it is caused by this patch (as246c - Allocate interface structures dynamically):
>
> http://marc.theaimsgroup.com/?l=linux-usb-devel&m=108239223425404&w=2
>
> Can you please revert it and see if that helps? I think it is this bit that is causing the problem:
>
> /*
> * usb_disable_device - Disable all the endpoints for a USB device
> * @dev: the device whose endpoints are being disabled
> @@ -835,6 +831,7 @@
> dev_dbg (&dev->dev, "unregistering interface %s\n",
> interface->dev.bus_id);
> device_unregister (&interface->dev);
> + dev->actconfig->interface[i] = NULL;
> }
> dev->actconfig = 0;
> if (dev->state == USB_STATE_CONFIGURED)
> @@ -1071,6 +1068,16 @@
> return 0;
> }

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.

Alan Stern


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