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)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 15 Feb 2016 20:45:34 +0000 (15:45 -0500)
commit8552bea30320cc866c7fb5d9a687c3e6d15fb5c1
tree3596aa2977b8c675a411acac8ec98d149d111c03
parent4c54b01e7221db1d14ef2506ac0b81f9ff69e26f
xhci: Fix list corruption in urb dequeue at host removal

[ Upstream commit 5c82171167adb8e4ac77b91a42cd49fb211a81a0 ]

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.

Cc: <stable@vger.kernel.org>
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: Sasha Levin <sasha.levin@oracle.com>
drivers/usb/host/xhci.c