aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2006-07-10 07:44:47 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-10 16:24:21 -0400
commitd6b7d3b62069be60d5b13358bac8670dacdd7a81 (patch)
treef8f2fbdc0193d41412661aa3bd432b10822c0aef
parent82081797b7d72108a47c82997349d1ea6a3eb3d5 (diff)
[PATCH] usb-storage: wait for URB to complete
We all failed to notice that Franck's recent update to usb-storage allowed an URB to complete after its context data was no longer valid. This patch (as746) makes the driver wait for the URB to complete whenever there's a timeout. Although timeouts in usb-storage are relatively uncommon, they do occur. Without this patch the code in 2.6.18-rc1 will fault within an interrupt handler, which is not nice at all. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/usb/storage/transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
index eb7188b3565c..d6acc92a4ae3 100644
--- a/drivers/usb/storage/transport.c
+++ b/drivers/usb/storage/transport.c
@@ -180,7 +180,7 @@ static int usb_stor_msg_common(struct us_data *us, int timeout)
180 if (timeleft <= 0) { 180 if (timeleft <= 0) {
181 US_DEBUGP("%s -- cancelling URB\n", 181 US_DEBUGP("%s -- cancelling URB\n",
182 timeleft == 0 ? "Timeout" : "Signal"); 182 timeleft == 0 ? "Timeout" : "Signal");
183 usb_unlink_urb(us->current_urb); 183 usb_kill_urb(us->current_urb);
184 } 184 }
185 185
186 /* return the URB status */ 186 /* return the URB status */