Skip to contentSkip to conversation

class/usblp: cleanup

PATCH Oliver Neukum 1 participant 1 message Oct 23, 2004 Kernel janitors

lore
Share & tools
lore
#0 lore raw

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