Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/usb



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

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


Home | Main Index | Thread Index | Old Index