Commit 7571f089 authored by Márton Németh's avatar Márton Németh Committed by Greg Kroah-Hartman
Browse files

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

Signed-off-by: default avatarMárton Németh <>
Cc: stable <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 63d5e5a7
......@@ -799,20 +799,6 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
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",
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,
spin_lock_irqsave(&the_controller->lock, flags);
spin_unlock_irqrestore(&the_controller->lock, flags);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment