aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Kotrasinski <i.kotrasinsk@samsung.com>2015-09-21 05:30:45 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-04 05:59:03 -0400
commit635e664a6b4d4b9c12f507045d156ea419b62dff (patch)
treef6e18c6921b55b66f522e9ee446b80dadd4fb1ab
parent03b0a52822fec8fba351fd472f3adda6fd760e77 (diff)
usbip: vhci_hcd: at unlink, return -EIDRM if vhci_rx took the urb
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>
-rw-r--r--drivers/usb/usbip/vhci_hcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c
index 51145cf92860..7fbe19d5279e 100644
--- a/drivers/usb/usbip/vhci_hcd.c
+++ b/drivers/usb/usbip/vhci_hcd.c
@@ -631,7 +631,7 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
631 /* URB was never linked! or will be soon given back by 631 /* URB was never linked! or will be soon given back by
632 * vhci_rx. */ 632 * vhci_rx. */
633 spin_unlock(&the_controller->lock); 633 spin_unlock(&the_controller->lock);
634 return 0; 634 return -EIDRM;
635 } 635 }
636 636
637 { 637 {