Date: Fri, 18 Jul 2014 11:58:33 +1000
   from: matthew green <m...@eterna.com.au>

   "Taylor R Campbell" writes:
   > Fix usb task queue locking.

   why does this take the lock and then use atomic operations?

Reading task->queue is not covered by a lock: until you know what it
is you don't know what lock to hold.  usb_task_rem needs to read it
and use it without holding any queue's lock, and by the time
usb_task_rem takes a lock, the value it read may be out of date.

   such strange usage should have a comment..

Better yet, we should have a better task queue system.  More on that
soon, perhaps...

Reply via email to