Skip to content

Commit

Permalink
usb: xhci: trace URB before giving it back instead of after
Browse files Browse the repository at this point in the history
Don't access any members of a URB after giving it back.
URB might be freed by then already.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Mathias Nyman authored and Greg Kroah-Hartman committed May 18, 2017
1 parent 5120a26 commit 7bc5d5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/host/xhci-ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 7bc5d5a

Please sign in to comment.