Skip to content

Commit

Permalink
staging: usbip: remove double giveback of URB
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Márton Németh authored and Greg Kroah-Hartman committed Jan 10, 2011
1 parent 63d5e5a commit 7571f08
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions drivers/staging/usbip/vhci_hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
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");
Expand Down

0 comments on commit 7571f08

Please sign in to comment.