class/usblp: cleanup
Am Samstag, 23. Oktober 2004 00:56 schrieb Nishanth Aravamudan:> + while (timeout) {> if (signal_pending(current)) {> remove_wait_queue(&usblp->wait, &wait);> return writecount ? writecount : -EINTR;> }> - set_current_state(TASK_INTERRUPTIBLE);> - if (timeout && !usblp->wcomplete) {> - timeout = schedule_timeout(timeout);> - } else {> - set_current_state(TASK_RUNNING);> + if (usblp->wcomplete) {> break;> }> + set_current_state(TASK_INTERRUPTIBLE); You can miss a wake up here.
Quoted 1 line
+ timeout =
schedule_timeout(timeout);> }
The order of checking wcomplete and setting the state must be reversed.
Regards Oliver
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors