From: Mathias Nyman Date: Wed, 17 May 2017 15:31:59 +0000 (+0300) Subject: usb: xhci: trace URB before giving it back instead of after X-Git-Tag: MMI-PSA29.97-13-9~5558^2~10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7bc5d5aff356f3ba16c4d1e9eaf95cc99b7574ab;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git usb: xhci: trace URB before giving it back instead of after Don't access any members of a URB after giving it back. URB might be freed by then already. Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 74bf5c60a260..507ba7734b94 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -641,8 +641,8 @@ static void xhci_giveback_urb_in_irq(struct xhci_hcd *xhci, xhci_urb_free_priv(urb_priv); usb_hcd_unlink_urb_from_ep(hcd, urb); spin_unlock(&xhci->lock); - usb_hcd_giveback_urb(hcd, urb, status); trace_xhci_urb_giveback(urb); + usb_hcd_giveback_urb(hcd, urb, status); spin_lock(&xhci->lock); }