Commit 0c2b45d0 authored by Arjan van de Ven's avatar Arjan van de Ven Committed by Greg Kroah-Hartman

[PATCH] USB: fix race in whiteheat serial driver

Patch below fixes an obvious race in the whiteheat usb serial driver...
parent 8f8d19fc
......@@ -1153,10 +1153,8 @@ static int firm_send_command (struct usb_serial_port *port, __u8 command, __u8 *
}
/* 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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment