On Thu, Jul 26, 2012 at 11:25:44PM +0200, Damjan wrote: > While playing with my custom made i2c-tiny-usb adapter I triggered > this kernel OOPS in usb_submit_urb in the drivers/usb/core/urb.c > file. > > From looking at the file, before line 329 it needs to check if > &ep->desc is NULL, before it sends it to the usb_endpoint_type > (inline) function. > > As seen in the oops, I suppose that it tried to send some usb > packets even after the device got disconnected, which is another > problem, but it still shouldn't oops the kernel. > > The attached patch, seems to fix the usb_submit_urb/usbcore part of > the problem just fine. > > I'm just not sure if -EINVAL is a correct error number to return? How did you continue to send data to the device if the device is gone? Did you forget to stop a timer or something? Odds are the device is long cleaned up, so you might need to just ensure that you have a reference to the device if you keep a pointer to it so this doesn't happen in the future. Do you have a pointer to your driver anywhere? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html