xhci: Fix list corruption in urb dequeue at host removal
authorMathias Nyman <mathias.nyman@linux.intel.com>
Tue, 26 Jan 2016 15:50:12 +0000 (17:50 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 27 Feb 2016 14:28:46 +0000 (14:28 +0000)
commit83c428427da37fc295a68ee8d08e5ca13950627c
tree71e5a2290355f1b6d7d05924891daf4950b32045
parent8903170645435a363237d322c9e2f3a0700c0789
xhci: Fix list corruption in urb dequeue at host removal

commit 5c82171167adb8e4ac77b91a42cd49fb211a81a0 upstream.

xhci driver frees data for all devices, both usb2 and and usb3 the
first time usb_remove_hcd() is called, including td_list and and xhci_ring
structures.

When usb_remove_hcd() is called a second time for the second xhci bus it
will try to dequeue all pending urbs, and touches td_list which is already
freed for that endpoint.

Reported-by: Joe Lawrence <joe.lawrence@stratus.com>
Tested-by: Joe Lawrence <joe.lawrence@stratus.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/host/xhci.c