On Thursday 08 June 2006 8:26 pm, Alan Stern wrote:
> 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. 

Yes there is ... they fail during submit, since the device is marked
as gone.  Submits start failing even before disconnect() is called.


> (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.

Well, the specific scenario here was errors on unplug, not rmmod;
and I'd call it an error if URBs could be submitted to endpoints
that aren't bound to some driver.  (Yep, likely we have bugs in
that space.)

- Dave



_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to