ChangeSet 1.1595.7.17, 2003/07/30 13:19:15-07:00, oliver@neukum.org [PATCH] USB: fix race condition in usblp_write - fix timeout handling drivers/usb/class/usblp.c | 6 ++++++ 1 files changed, 6 insertions(+) diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c --- a/drivers/usb/class/usblp.c Fri Aug 1 10:54:58 2003 +++ b/drivers/usb/class/usblp.c Fri Aug 1 10:54:58 2003 @@ -626,6 +626,12 @@ } } 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);