Joe Lawrence 89140fdaf1 xhci: harden xhci_find_next_ext_cap against device removal
xhci_find_next_ext_cap doesn't check for PCI hotplug removal and may use
the PCI master abort bit pattern (~0) to calculate a new PCI address
offset to read/write.  The has lead to reproducable crashes when testing
surprise removal during device initialization on a Stratus platform, at
least after commit d5ddcdf4d672 ("xhci: rework xhci extended capability
list parsing functions").

The crash is repeatable on a Stratus platform when injecting hardware
faults to induce xHCI host controller hotplug during driver
initialization.  If a PCI read in xhci_find_next_ext_cap returns the
master abort pattern, quirk_usb_handoff_xhci may start using a bogus
ext_cap_offset to start searching more bogus PCI addresses.

Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-04 17:00:10 -08:00
..
2014-12-14 16:10:09 -08:00
2014-11-03 15:26:15 -08:00
2013-12-03 10:34:33 -08:00
2015-04-03 19:03:18 +02:00
2013-12-03 10:34:33 -08:00
2015-04-03 19:03:18 +02:00
2014-12-14 16:10:09 -08:00
2015-04-03 19:03:17 +02:00
2014-12-14 16:10:09 -08:00
2015-01-25 21:01:13 +08:00
2015-06-08 14:26:22 -07:00
2013-01-24 13:42:09 -08:00