ChangeSet 1.1673.8.30, 2004/03/26 12:30:48-08:00, [EMAIL PROTECTED]

[PATCH] USB: fix race in whiteheat serial driver

Patch below fixes an obvious race in the whiteheat usb serial driver...


 drivers/usb/serial/whiteheat.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)


diff -Nru a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
--- a/drivers/usb/serial/whiteheat.c    Wed Apr 14 14:37:47 2004
+++ b/drivers/usb/serial/whiteheat.c    Wed Apr 14 14:37:47 2004
@@ -1153,10 +1153,8 @@
        }
 
        /* wait for the command to complete */
-       timeout = COMMAND_TIMEOUT;
-       while (timeout && (command_info->command_finished == FALSE)) {
-               timeout = interruptible_sleep_on_timeout (&command_info->wait_command, 
timeout);
-       }
+       wait_event_interruptible_timeout(command_info->wait_command, 
+               (command_info->command_finished != FALSE), COMMAND_TIMEOUT);
 
        spin_lock_irqsave(&command_info->lock, flags);
 



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to