linux/drivers/usb/host
Pete Zaitcev d23356da71 USB: fix crash in uhci_scan_schedule
When hardware is removed on a Stratus, the system may crash like this:

ACPI: PCI interrupt for device 0000:7c:00.1 disabled
Trying to free nonexistent resource <00000000a8000000-00000000afffffff>
Trying to free nonexistent resource <00000000a4800000-00000000a480ffff>
uhci_hcd 0000:7e:1d.0: remove, state 1
usb usb2: USB disconnect, address 1
usb 2-1: USB disconnect, address 2
Unable to handle kernel paging request at 0000000000100100 RIP:
 [<ffffffff88021950>] :uhci_hcd:uhci_scan_schedule+0xa2/0x89c

 #4 [ffff81011de17e50] uhci_scan_schedule at ffffffff88021918
 #5 [ffff81011de17ed0] uhci_irq at ffffffff88023cb8
 #6 [ffff81011de17f10] usb_hcd_irq at ffffffff801f1c1f
 #7 [ffff81011de17f20] handle_IRQ_event at ffffffff8001123b
 #8 [ffff81011de17f50] __do_IRQ at ffffffff800ba749

This occurs because an interrupt scans uhci->skelqh, which is
being freed. We do the right thing: disable the interrupts in the
device, and do not do any processing if the interrupt is shared
with other source, but it's possible that another CPU gets
delayed somewhere (e.g. loops) until we started freeing.

The agreed-upon solution is to wait for interrupts to play out
before proceeding. No other bareers are neceesary.

A backport of this patch was tested on a 2.6.18 based kernel.
Testing of 2.6.32-based kernels is under way, but it takes us
forever (months) to turn this around. So I think it's a good
patch and we should keep it.

Tracked in RH bz#516851

Signed-Off-By: Pete Zaitcev <zaitcev@redhat.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02 14:54:12 -08:00
..
whci USB: whci-hcd: correctly handle sg lists longer than QTD_MAX_XFER_SIZE. 2009-12-11 11:55:26 -08:00
Kconfig USB: MXC: Add i.MX21 specific USB host controller driver. 2010-03-02 14:52:55 -08:00
Makefile USB: MXC: Add i.MX21 specific USB host controller driver. 2010-03-02 14:52:55 -08:00
ehci-atmel.c USB: ehci-atmel.c: use resource_size() 2010-03-02 14:53:18 -08:00
ehci-au1xxx.c USB: ehci-au1xxx.c: use platform_get_resource() and resource_size() 2010-03-02 14:53:18 -08:00
ehci-dbg.c
ehci-fsl.c USB: ehci-fsl: Add power management support 2010-03-02 14:53:15 -08:00
ehci-fsl.h
ehci-hcd.c USB: add missing delay during remote wakeup 2010-01-20 15:24:34 -08:00
ehci-hub.c USB: ehci: phy low power mode bug fixing 2010-02-16 15:11:04 -08:00
ehci-ixp4xx.c
ehci-mem.c
ehci-mxc.c USB: fix occasional ULPI timeouts with ehci-mxc 2010-03-02 14:53:05 -08:00
ehci-omap.c usb: host: ehci: adding regulator framework in ehci-omap.c driver. 2010-03-02 14:53:49 -08:00
ehci-orion.c USB: ehci-orion.c: use resource_size() 2010-03-02 14:53:17 -08:00
ehci-pci.c USB: work around for EHCI with quirky periodic schedules 2009-11-30 16:43:16 -08:00
ehci-ppc-of.c
ehci-ps3.c
ehci-q.c USB: EHCI: fix handling of unusual interrupt intervals 2010-01-20 15:24:34 -08:00
ehci-sched.c USB: ehci: fix audio record functionality for some Full speed sound blaster devices 2010-03-02 14:53:13 -08:00
ehci-w90x900.c
ehci-xilinx-of.c USB: Add support for Xilinx USB host controller 2009-12-11 11:55:13 -08:00
ehci.h USB: work around for EHCI with quirky periodic schedules 2009-11-30 16:43:16 -08:00
fhci-dbg.c
fhci-hcd.c USB: FHCI: Correct the size argument to kzalloc 2010-03-02 14:54:00 -08:00
fhci-hub.c
fhci-mem.c
fhci-q.c
fhci-sched.c kfifo: move struct kfifo in place 2009-12-22 14:17:55 -08:00
fhci-tds.c USB: FHCI: Fix build after kfifo rework 2010-02-16 15:11:07 -08:00
fhci.h kfifo: rename kfifo_put... into kfifo_in... and kfifo_get... into kfifo_out... 2009-12-22 14:17:56 -08:00
hwa-hc.c
imx21-dbg.c USB: MXC: Add i.MX21 specific USB host controller driver. 2010-03-02 14:52:55 -08:00
imx21-hcd.c USB: MXC: Add i.MX21 specific USB host controller driver. 2010-03-02 14:52:55 -08:00
imx21-hcd.h USB: MXC: Add i.MX21 specific USB host controller driver. 2010-03-02 14:52:55 -08:00
isp116x-hcd.c
isp116x.h
isp1362-hcd.c USB: isp1362: Use kzalloc for allocating only one thing 2010-03-02 14:53:25 -08:00
isp1362.h USB: FIX bitfield istl_flip:1, make it unsigned. 2009-12-11 11:55:20 -08:00
isp1760-hcd.c USB: Fix level of isp1760 Reloading ptd error message 2010-01-20 15:24:35 -08:00
isp1760-hcd.h
isp1760-if.c
ohci-at91.c USB: modifications for at91sam9g10 2009-12-11 11:55:15 -08:00
ohci-au1xxx.c const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
ohci-dbg.c
ohci-ep93xx.c
ohci-hcd.c USB: ohci: quirk AMD prefetch for USB 1.1 ISO transfer 2009-11-17 16:46:33 -08:00
ohci-hub.c
ohci-lh7a404.c
ohci-mem.c
ohci-omap.c
ohci-pci.c USB: ohci: quirk AMD prefetch for USB 1.1 ISO transfer 2009-11-17 16:46:33 -08:00
ohci-pnx4008.c USB: Add missing static markers to ohci-pnx4008 2009-12-11 11:55:14 -08:00
ohci-pnx8550.c
ohci-ppc-of.c
ohci-ppc-soc.c
ohci-ps3.c
ohci-pxa27x.c const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
ohci-q.c USB: ohci: quirk AMD prefetch for USB 1.1 ISO transfer 2009-11-17 16:46:33 -08:00
ohci-s3c2410.c
ohci-sa1111.c
ohci-sh.c
ohci-sm501.c
ohci-ssb.c
ohci-tmio.c
ohci.h USB: ohci: quirk AMD prefetch for USB 1.1 ISO transfer 2009-11-17 16:46:33 -08:00
oxu210hp-hcd.c
oxu210hp.h
pci-quirks.c
pci-quirks.h
r8a66597-hcd.c usb: r8a66597-hcd: Fix up spinlock recursion in root hub polling. 2010-02-05 11:53:28 +09:00
r8a66597.h
sl811-hcd.c USB: host: SL811: fix unaligned accesses 2010-03-02 14:53:26 -08:00
sl811.h
sl811_cs.c pcmcia: rework the irq_req_t typedef 2009-11-28 18:03:14 +01:00
u132-hcd.c
uhci-debug.c
uhci-hcd.c USB: fix crash in uhci_scan_schedule 2010-03-02 14:54:12 -08:00
uhci-hcd.h
uhci-hub.c USB: add missing delay during remote wakeup 2010-01-20 15:24:34 -08:00
uhci-q.c
xhci-dbg.c USB: xhci: Fix compile issues with xhci_get_slot_state() 2010-03-02 14:54:01 -08:00
xhci-ext-caps.h
xhci-hcd.c USB: xhci: No GFP_KERNEL in block error handling 2010-03-02 14:53:19 -08:00
xhci-hub.c USB: xhci: Allow roothub ports to be disabled. 2010-03-02 14:53:12 -08:00
xhci-mem.c USB: rename USB_SPEED_VARIABLE to USB_SPEED_WIRELESS 2010-03-02 14:53:36 -08:00
xhci-pci.c USB: Add call to notify xHC of a device reset. 2010-03-02 14:53:12 -08:00
xhci-ring.c USB: xhci: Notify the xHC when a device is reset. 2010-03-02 14:53:12 -08:00
xhci.h USB: xhci: Fix compile issues with xhci_get_slot_state() 2010-03-02 14:54:01 -08:00