On Thu, 8 Jun 2006, David Brownell wrote: > That said, I don't see an obvious race there. If the device disconnects, > there's now a guarantee that all pending urbs will have completed before > the driver disconnect() method is called. (As of maybe 2.6.8 or so. The > original 2.4 code of course couldn't rely on such guarantees. The lack of > such guarantees meant a seemingly endless supply of oops-on-disconnect bugs.)
But there's no guarantee that URBs submitted _after_ the disconnect method has returned will fail. (Of course, if the device really has been unplugged then they definitely will fail, but if the driver has merely been unbound from the interface then they might not.) Drivers do need to have sufficient synchronization to avoid this problem. Hmmm, I see that usb-skeleton does _not_ provide the necessary checks. Looks like an opportunity for a patch... Alan Stern _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel