Re: USB: FIx locks and urb->status in adutux

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Pete Zaitcev
Date: Tuesday, October 23, 2007 - 2:38 pm

On Tue, 23 Oct 2007 11:38:37 +0200, Oliver Neukum <oliver@neukum.org> wrote:



Is it always safe to kill unfilled URBs? The filled but unsubmitted ones
are ok, but in this case it's possible that we only allocated something
but never submitted. Our current implementation happens to be safe by
virtue of ->dev being NULL in such case. I do not remember if we always
guaranteed that and since Vitaly is going to take this code for a
backport, I decided to play it safe.

I would rather leave this.


That's a common issue with sleep_on and its derivatives really.
I would need to replace it with explicit queue adds to fix.

I suppose I can fix it too.



Ah yes. Sorry about that, will fix.


What for? Nobody ever tests it or dereferences it after ->open returned
an error. I can set 0xaaaabbbb to it just as well.


True, this is not really necessary... And I set and clear such flags
without locking around them when I'm sure that URB is not in progress.
I just added it in case someone wants to expand this code by testing
two things together or something, because here the callback certainly
can strike at any time. The whole excercise started because Vitaliy
wanted to reuse the code.

-- Pete
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
USB: FIx locks and urb-&gt;status in adutux, Pete Zaitcev, (Mon Oct 22, 8:34 pm)
Re: USB: FIx locks and urb->status in adutux, Pete Zaitcev, (Tue Oct 23, 2:38 pm)
Re: USB: FIx locks and urb-&gt;status in adutux, Pete Zaitcev, (Tue Oct 23, 6:53 pm)
Re: USB: FIx locks and urb-&gt;status in adutux, Oliver Neukum, (Wed Oct 24, 7:04 am)
Re: USB: FIx locks and urb-&gt;status in adutux, Vitaliy Ivanov, (Wed Oct 24, 7:09 am)
Re: USB: FIx locks and urb-&gt;status in adutux, Oliver Neukum, (Wed Oct 24, 7:49 am)
Re: USB: FIx locks and urb-&gt;status in adutux, Greg KH, (Wed Oct 24, 2:25 pm)
Re: USB: FIx locks and urb-&gt;status in adutux, Pete Zaitcev, (Wed Oct 24, 8:20 pm)
Re: USB: FIx locks and urb-&gt;status in adutux, Pete Zaitcev, (Wed Oct 24, 8:25 pm)
Re: USB: FIx locks and urb-&gt;status in adutux, Vitaliy Ivanov, (Fri Oct 26, 2:57 am)
Re: USB: FIx locks and urb-&gt;status in adutux, Vitaliy Ivanov, (Mon Oct 29, 11:04 am)
Re: USB: FIx locks and urb-&gt;status in adutux, Pete Zaitcev, (Mon Oct 29, 9:24 pm)
Re: USB: FIx locks and urb-&gt;status in adutux, Vitaliy Ivanov, (Tue Oct 30, 6:09 am)
Re: USB: FIx locks and urb-&gt;status in adutux, Pete Zaitcev, (Tue Oct 30, 2:54 pm)
Re: USB: FIx locks and urb-&gt;status in adutux, Vitaliy Ivanov, (Wed Oct 31, 4:54 am)
Re: USB: FIx locks and urb-&gt;status in adutux, Pete Zaitcev, (Wed Oct 31, 3:01 pm)
Re: USB: FIx locks and urb-&gt;status in adutux, Vitaliy Ivanov, (Thu Nov 1, 2:06 am)
Re: USB: FIx locks and urb-&gt;status in adutux, Pete Zaitcev, (Thu Nov 1, 10:28 am)