linux-stable/drivers/usb/host
Mathias Nyman a2bc47c43e xhci: Fix null pointer dereference when host dies
Make sure xhci_free_dev() and xhci_kill_endpoint_urbs() do not race
and cause null pointer dereference when host suddenly dies.

Usb core may call xhci_free_dev() which frees the xhci->devs[slot_id]
virt device at the same time that xhci_kill_endpoint_urbs() tries to
loop through all the device's endpoints, checking if there are any
cancelled urbs left to give back.

hold the xhci spinlock while freeing the virt device

Cc: stable@vger.kernel.org
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20230116142216.1141605-4-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 16:37:24 +01:00
..
bcma-hcd.c USB: bcma: Make GPIO explicitly optional 2022-11-08 16:39:56 +01:00
ehci-atmel.c usb: clean up after dropping driver registration log spam 2022-09-05 13:23:28 +02:00
ehci-brcm.c
ehci-dbg.c
ehci-exynos.c usb: host: ehci-exynos: switch to using gpiod API 2022-09-30 13:57:10 +02:00
ehci-fsl.c usb: reduce kernel log spam on driver registration 2022-08-31 09:07:53 +02:00
ehci-fsl.h
ehci-grlib.c usb: Check !irq instead of irq == NO_IRQ 2022-11-11 10:28:38 +01:00
ehci-hcd.c usb: reduce kernel log spam on driver registration 2022-08-31 09:07:53 +02:00
ehci-hub.c
ehci-mem.c
ehci-mv.c
ehci-npcm7xx.c usb: clean up after dropping driver registration log spam 2022-09-05 13:23:28 +02:00
ehci-omap.c usb: reduce kernel log spam on driver registration 2022-08-31 09:07:53 +02:00
ehci-orion.c usb: clean up after dropping driver registration log spam 2022-09-05 13:23:28 +02:00
ehci-pci.c usb: ehci-pci: Set PROBE_PREFER_ASYNCHRONOUS 2022-11-09 12:36:19 +01:00
ehci-platform.c usb: clean up after dropping driver registration log spam 2022-09-05 13:23:28 +02:00
ehci-ppc-of.c usb: Check !irq instead of irq == NO_IRQ 2022-11-11 10:28:38 +01:00
ehci-ps3.c
ehci-q.c usb: ehci: Use endpoint in URB to get maxpacket 2022-08-31 09:07:53 +02:00
ehci-sched.c
ehci-sh.c
ehci-spear.c usb: clean up after dropping driver registration log spam 2022-09-05 13:23:28 +02:00
ehci-st.c usb: clean up after dropping driver registration log spam 2022-09-05 13:23:28 +02:00
ehci-sysfs.c
ehci-timer.c
ehci-xilinx-of.c usb: host: ehci-xilinx: adding description for return value 2022-05-12 13:58:48 +02:00
ehci.h usb: host: fix a typo in ehci.h 2022-11-29 08:56:09 +01:00
fhci-dbg.c
fhci-hcd.c USB/Thunderbolt driver changes for 6.2-rc1 2022-12-16 03:22:53 -08:00
fhci-hub.c USB: FHCI: Switch to GPIO descriptors 2022-09-01 16:08:29 +02:00
fhci-mem.c
fhci-q.c
fhci-sched.c
fhci-tds.c
fhci.h USB: FHCI: Switch to GPIO descriptors 2022-09-01 16:08:29 +02:00
fsl-mph-dr-of.c drivers/usb/host/ehci-fsl: Fix interrupt setup in host mode. 2022-07-08 14:58:51 +02:00
isp116x-hcd.c usb: remove third argument of usb_maxpacket() 2022-04-23 10:33:53 +02:00
isp116x.h
isp1362-hcd.c usb: remove third argument of usb_maxpacket() 2022-04-23 10:33:53 +02:00
isp1362.h
Kconfig usb: fotg210: Collect pieces of dual mode controller 2022-11-09 12:38:09 +01:00
Makefile usb: fotg210: Collect pieces of dual mode controller 2022-11-09 12:38:09 +01:00
max3421-hcd.c usb: max-3421: drop unexpected word "the" in the comments 2022-06-24 13:39:53 +02:00
octeon-hcd.c staging: octeon-usb: move driver out of staging 2022-06-21 16:43:37 +02:00
octeon-hcd.h staging: octeon-usb: move driver out of staging 2022-06-21 16:43:37 +02:00
ohci-at91.c usb: clean up after dropping driver registration log spam 2022-09-05 13:23:28 +02:00
ohci-da8xx.c usb: reduce kernel log spam on driver registration 2022-08-31 09:07:53 +02:00
ohci-dbg.c
ohci-exynos.c usb: clean up after dropping driver registration log spam 2022-09-05 13:23:28 +02:00
ohci-hcd.c usb: reduce kernel log spam on driver registration 2022-08-31 09:07:53 +02:00
ohci-hub.c
ohci-mem.c
ohci-nxp.c usb: reduce kernel log spam on driver registration 2022-08-31 09:07:53 +02:00
ohci-omap.c usb: reduce kernel log spam on driver registration 2022-08-31 09:07:53 +02:00
ohci-pci.c USB: hcd-pci: Drop the unused id parameter from usb_hcd_pci_probe() 2022-09-01 16:08:35 +02:00
ohci-platform.c usb: clean up after dropping driver registration log spam 2022-09-05 13:23:28 +02:00
ohci-ppc-of.c usb: Check !irq instead of irq == NO_IRQ 2022-11-11 10:28:38 +01:00
ohci-ps3.c
ohci-pxa27x.c usb: clean up after dropping driver registration log spam 2022-09-05 13:23:28 +02:00
ohci-q.c
ohci-s3c2410.c usb: clean up after dropping driver registration log spam 2022-09-05 13:23:28 +02:00
ohci-sa1111.c ARM: sa1100/assabet: move dmabounce hack to ohci driver 2022-07-07 18:18:47 +02:00
ohci-sm501.c USB: ohci-sm501: Fix typo in comment 2022-06-21 16:39:39 +02:00
ohci-spear.c usb: clean up after dropping driver registration log spam 2022-09-05 13:23:28 +02:00
ohci-st.c usb: clean up after dropping driver registration log spam 2022-09-05 13:23:28 +02:00
ohci-tmio.c
ohci.h
oxu210hp-hcd.c usb: remove third argument of usb_maxpacket() 2022-04-23 10:33:53 +02:00
pci-quirks.c
pci-quirks.h
r8a66597-hcd.c usb: remove third argument of usb_maxpacket() 2022-04-23 10:33:53 +02:00
r8a66597.h
sl811-hcd.c usb: remove third argument of usb_maxpacket() 2022-04-23 10:33:53 +02:00
sl811.h
sl811_cs.c
ssb-hcd.c
u132-hcd.c usb: clean up after dropping driver registration log spam 2022-09-05 13:23:28 +02:00
uhci-debug.c
uhci-grlib.c usb: Check !irq instead of irq == NO_IRQ 2022-11-11 10:28:38 +01:00
uhci-hcd.c usb: clean up after dropping driver registration log spam 2022-09-05 13:23:28 +02:00
uhci-hcd.h usb/host: fix repeated words in comments 2022-07-27 14:33:33 +02:00
uhci-hub.c
uhci-pci.c USB: hcd-pci: Drop the unused id parameter from usb_hcd_pci_probe() 2022-09-01 16:08:35 +02:00
uhci-platform.c
uhci-q.c
xen-hcd.c xen/usbfront: use xenbus_setup_ring() and xenbus_teardown_ring() 2022-05-19 14:22:05 +02:00
xhci-dbg.c
xhci-dbgcap.c xhci: dbc: Fix memory leak in xhci_alloc_dbc() 2022-09-22 15:52:29 +02:00
xhci-dbgcap.h xhci: dbgtty: use IDR to support several dbc instances. 2022-02-17 16:20:45 +01:00
xhci-dbgtty.c xhci: dbgtty: use IDR to support several dbc instances. 2022-02-17 16:20:45 +01:00
xhci-debugfs.c
xhci-debugfs.h
xhci-ext-caps.c
xhci-ext-caps.h
xhci-histb.c
xhci-hub.c xhci: export two xhci_hub functions for xhci-pci module usage 2022-11-30 12:10:48 +01:00
xhci-mem.c xhci: Remove device endpoints from bandwidth list when freeing the device 2022-10-25 19:53:41 +02:00
xhci-mtk-sch.c usb: xhci-mtk: fix bandwidth release issue 2022-08-19 10:39:08 +02:00
xhci-mtk.c usb: xhci-mtk: fix leakage of shared hcd when fail to set wakeup irq 2022-11-29 08:56:09 +01:00
xhci-mtk.h usb: xhci-mtk: remove bandwidth budget table 2022-05-12 18:35:38 +02:00
xhci-mvebu.c Revert "usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720" 2022-02-25 19:12:21 +05:30
xhci-mvebu.h Revert "usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720" 2022-02-25 19:12:21 +05:30
xhci-pci-renesas.c usb: renesas-xhci: Do not print any log while fw verif success 2022-07-27 14:37:48 +02:00
xhci-pci.c xhci-pci: set the dma max_seg_size 2023-01-17 16:37:24 +01:00
xhci-pci.h
xhci-plat.c Merge 6.0-rc4 into usb-next 2022-09-05 08:03:23 +02:00
xhci-plat.h Revert "usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720" 2022-02-25 19:12:21 +05:30
xhci-rcar.c usb: Drop commas after SoC match table sentinels 2022-03-03 15:45:15 +01:00
xhci-rcar.h
xhci-ring.c usb: xhci: Check endpoint is valid before dereferencing it 2023-01-17 16:37:24 +01:00
xhci-tegra.c usb: xhci: tegra: Fix error check 2022-06-10 11:48:52 +02:00
xhci-trace.c
xhci-trace.h xhci: tracing: Use the new __vstring() helper 2022-07-15 17:44:41 -04:00
xhci.c xhci: Fix null pointer dereference when host dies 2023-01-17 16:37:24 +01:00
xhci.h xhci: Prevent infinite loop in transaction errors recovery for streams 2022-11-30 12:10:48 +01:00