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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <vitalivanov@...>
Cc: Oliver Neukum <oliver@...>, <linux-usb-devel@...>, <greg@...>, <linux-kernel@...>, <netwiz@...>, <zaitcev@...>
Date: Tuesday, October 30, 2007 - 12:24 am

On Mon, 29 Oct 2007 20:04:57 +0200, Vitaliy Ivanov <vitalivanov@gmail.com> wrote:


Great!


OK. This trick was popular in UNIX. Personally I think it's in a bad
taste, because good applications still need to verify if only one
instance is running, and threfore can use application level locking.
But if you are gunning for the maintenership I'm not going to argue
your style. The busy lock-out certainly works better than "/dev/cua" :-)

However, this looks wrong:


The finished flag is only set when URB is not in use anymore. Did you
observe an anomaly with my code? Any hangs? If so, I assure you this
is not the fix. As it's written, even if we ignore the failure (e.g.
do not pass it to userland), we sill have to maintain the correct
flag state.

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