浏览代码

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>
Igor Kotrasinski 10 年之前
父节点
当前提交
635e664a6b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/usb/usbip/vhci_hcd.c

+ 1 - 1
drivers/usb/usbip/vhci_hcd.c

@@ -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
 		/* URB was never linked! or will be soon given back by
 		 * vhci_rx. */
 		 * vhci_rx. */
 		spin_unlock(&the_controller->lock);
 		spin_unlock(&the_controller->lock);
-		return 0;
+		return -EIDRM;
 	}
 	}
 
 
 	{
 	{