Commit fda616fe authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

[PATCH] USB: fix race condition in usblp_write

  - fix timeout handling
parent bb672f57
......@@ -626,6 +626,12 @@ static ssize_t usblp_write(struct file *file, const char __user *buffer, size_t
}
}
remove_wait_queue(&usblp->wait, &wait);
if (!timeout) {
/* we timed out and need to bail out cleanly */
usb_unlink_urb(usblp->writeurb);
return writecount ? writecount : -EIO;
}
}
down (&usblp->sem);
......
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