diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2009-08-27 17:36:14 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-23 09:46:18 -0400 |
commit | 9191eee7b8a0e18c07c06d6da502706805cab6d2 (patch) | |
tree | a182a6397331ef8ccbeb1d549f5f3e638d256fff | |
parent | 83fbcdcca03013bb5af130d6d91eba11e3d3269e (diff) |
USB: xhci: Don't touch xhci_td after it's freed.
On a successful transfer, urb->td is freed before the URB is ready to be
given back to the driver. Don't touch urb->td after it's freed. This bug
would have only shown up when xHCI debugging was turned on, and the freed
memory was quickly reused for something else.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 2eadf0693862..4142c04b5adf 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -1193,7 +1193,7 @@ cleanup: | |||
1193 | if (urb) { | 1193 | if (urb) { |
1194 | usb_hcd_unlink_urb_from_ep(xhci_to_hcd(xhci), urb); | 1194 | usb_hcd_unlink_urb_from_ep(xhci_to_hcd(xhci), urb); |
1195 | xhci_dbg(xhci, "Giveback URB %p, len = %d, status = %d\n", | 1195 | xhci_dbg(xhci, "Giveback URB %p, len = %d, status = %d\n", |
1196 | urb, td->urb->actual_length, status); | 1196 | urb, urb->actual_length, status); |
1197 | spin_unlock(&xhci->lock); | 1197 | spin_unlock(&xhci->lock); |
1198 | usb_hcd_giveback_urb(xhci_to_hcd(xhci), urb, status); | 1198 | usb_hcd_giveback_urb(xhci_to_hcd(xhci), urb, status); |
1199 | spin_lock(&xhci->lock); | 1199 | spin_lock(&xhci->lock); |