aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMárton Németh <nm127@freemail.hu>2010-12-13 15:59:09 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-01-10 15:26:02 -0500
commit7571f089d7522a95c103558faf313c7af8856ceb (patch)
tree9f90e63bdec0a2c87b465ea661f70afe9dbb9540
parent63d5e5a727240b317b0c2fa2abeb32b367aea196 (diff)
staging: usbip: remove double giveback of URB
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> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/usbip/vhci_hcd.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c
index 832608d3e57..08bd26a245d 100644
--- a/drivers/staging/usbip/vhci_hcd.c
+++ b/drivers/staging/usbip/vhci_hcd.c
@@ -799,20 +799,6 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
799 spin_unlock_irqrestore(&vdev->priv_lock, flags2); 799 spin_unlock_irqrestore(&vdev->priv_lock, flags2);
800 } 800 }
801 801
802
803 if (!vdev->ud.tcp_socket) {
804 /* tcp connection is closed */
805 usbip_uinfo("vhci_hcd: vhci_urb_dequeue() gives back urb %p\n",
806 urb);
807
808 usb_hcd_unlink_urb_from_ep(hcd, urb);
809
810 spin_unlock_irqrestore(&the_controller->lock, flags);
811 usb_hcd_giveback_urb(vhci_to_hcd(the_controller), urb,
812 urb->status);
813 spin_lock_irqsave(&the_controller->lock, flags);
814 }
815
816 spin_unlock_irqrestore(&the_controller->lock, flags); 802 spin_unlock_irqrestore(&the_controller->lock, flags);
817 803
818 usbip_dbg_vhci_hc("leave\n"); 804 usbip_dbg_vhci_hc("leave\n");