<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">ChangeSet 1.883.3.13, 2002/12/17 21:51:57-08:00, oliver@neukum.name

[PATCH] USB: fix an unlinking race in speedtouch driver

checking for -EINPROGRESS is wrong.


diff -Nru a/drivers/usb/misc/speedtouch.c b/drivers/usb/misc/speedtouch.c
--- a/drivers/usb/misc/speedtouch.c	Wed Dec 18 00:34:26 2002
+++ b/drivers/usb/misc/speedtouch.c	Wed Dec 18 00:34:26 2002
@@ -852,8 +852,7 @@
 		if ((!ctx-&gt;urb) || (!ctx-&gt;skb))
 			continue;
 
-		if (ctx-&gt;urb-&gt;status == -EINPROGRESS)
-			usb_unlink_urb (ctx-&gt;urb);
+		usb_unlink_urb (ctx-&gt;urb);
 
 		usb_free_urb (ctx-&gt;urb);
 		kfree_skb (ctx-&gt;skb);
@@ -863,8 +862,7 @@
 	for (i = 0; i &lt; UDSL_NUMBER_SND_URBS; i++) {
 		struct udsl_usb_send_data_context *ctx = &amp;(instance-&gt;send_ctx[i]);
 
-		if (ctx-&gt;urb-&gt;status == -EINPROGRESS)
-			usb_unlink_urb (ctx-&gt;urb);
+		usb_unlink_urb (ctx-&gt;urb);
 
 		if (ctx-&gt;skb)
 			ctx-&gt;vcc-&gt;pop (ctx-&gt;vcc, ctx-&gt;skb);
</pre></body></html>