Skip to content

Commit

Permalink
usbip: vhci_hcd: at unlink, return -EIDRM if vhci_rx took the urb
Browse files Browse the repository at this point in the history
In a situation where the urb is about to be returned or was never
there, we should return -EIDRM (as per usb_hcd_check_unlink_urb).
This is exactly the situation when the urb is picked up by vhci_rx
before we access priv.

Return -EIDRM rather than 0 when this happens.

Signed-off-by: Igor Kotrasinski <i.kotrasinsk@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Igor Kotrasinski authored and Greg Kroah-Hartman committed Oct 4, 2015
1 parent 03b0a52 commit 635e664
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/usbip/vhci_hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
/* URB was never linked! or will be soon given back by
* vhci_rx. */
spin_unlock(&the_controller->lock);
return 0;
return -EIDRM;
}

{
Expand Down

0 comments on commit 635e664

Please sign in to comment.