On Sun, 2 Dec 2001, Mark Burazin wrote:

> usb_submit_urb() can fail, but it will call the completion handler, while 
> before it was not so, so I manually freed his urb and data when submit failed 

Do I understand you correctly, you've seen situations where usb_submit_urb
returns some error (which one) but the completion handler for this very
urb gets called later on?

Wouldn't this create a whole bunch of races like you've seen for freeing
vs. completion handler? And how to solve this - blocking on urb->complete
would sleep forever if the completion handler would not always be called.

IMHO the returning of usb_submit_urb() should (and is, AFAICS) a clear
barrier indicating whether the completion handler will get called or not.

Martin


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

Reply via email to