public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usbip: remove double giveback of URB
@ 2010-12-13 20:59 Németh Márton
  2010-12-13 21:19 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Németh Márton @ 2010-12-13 20:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel; +Cc: LKML

From: Márton Németh <nm127@freemail.hu>

In the vhci_urb_dequeue() function the TCP connection is checked twice.
Each time when the TCP connection is closed the URB is unlinked and given
back. Remove the second attempt of unlinking and giving back of the URB completely.

This patch fixes the bug described at https://bugzilla.kernel.org/show_bug.cgi?id=24872 .

Signed-off-by: Márton Németh <nm127@freemail.hu>
---
--- linux-2.6.37-rc5/drivers/staging/usbip/vhci_hcd.c.orig	2010-12-13 08:21:51.000000000 +0100
+++ linux-2.6.37-rc5/drivers/staging/usbip/vhci_hcd.c	2010-12-13 21:17:30.000000000 +0100
@@ -799,20 +799,6 @@ static int vhci_urb_dequeue(struct usb_h
 		spin_unlock_irqrestore(&vdev->priv_lock, flags2);
 	}

-
-	if (!vdev->ud.tcp_socket) {
-		/* tcp connection is closed */
-		usbip_uinfo("vhci_hcd: vhci_urb_dequeue() gives back urb %p\n",
-									urb);
-
-		usb_hcd_unlink_urb_from_ep(hcd, urb);
-
-		spin_unlock_irqrestore(&the_controller->lock, flags);
-		usb_hcd_giveback_urb(vhci_to_hcd(the_controller), urb,
-								urb->status);
-		spin_lock_irqsave(&the_controller->lock, flags);
-	}
-
 	spin_unlock_irqrestore(&the_controller->lock, flags);

 	usbip_dbg_vhci_hc("leave\n");

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-13 21:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-13 20:59 [PATCH] usbip: remove double giveback of URB Németh Márton
2010-12-13 21:19 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox