linux-stable/drivers/usb/host
Mathias Nyman 5aed5b7c24 xhci: Remove device endpoints from bandwidth list when freeing the device
Endpoints are normally deleted from the bandwidth list when they are
dropped, before the virt device is freed.

If xHC host is dying or being removed then the endpoints aren't dropped
cleanly due to functions returning early to avoid interacting with a
non-accessible host controller.

So check and delete endpoints that are still on the bandwidth list when
freeing the virt device.

Solves a list_del corruption kernel crash when unbinding xhci-pci,
caused by xhci_mem_cleanup() when it later tried to delete already freed
endpoints from the bandwidth list.

This only affects hosts that use software bandwidth checking, which
currenty is only the xHC in intel Panther Point PCH (Ivy Bridge)

Cc: stable@vger.kernel.org
Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20221024142720.4122053-5-mathias.nyman@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25 19:53:41 +02:00
..
bcma-hcd.c
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 usb: host: {e|o}hci-dbg: kill useless 'ret' variable initializers 2022-02-15 15:11:20 +01:00
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
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: hcd-pci: Drop the unused id parameter from usb_hcd_pci_probe() 2022-09-01 16:08:35 +02: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: host: Fix refcount leak in ehci_hcd_ppc_of_probe 2022-06-10 11:21:55 +02: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 usb: host: ehci-sched: Use struct_size() in kzalloc() 2022-01-26 13:50:07 +01:00
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: Fix ehci infinite suspend-resume loop issue in zhaoxin 2022-04-21 18:53:53 +02:00
fhci-dbg.c
fhci-hcd.c USB: FHCI: Switch to GPIO descriptors 2022-09-01 16:08:29 +02: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
fotg210-hcd.c usb: reduce kernel log spam on driver registration 2022-08-31 09:07:53 +02:00
fotg210.h
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: host: npcm: Add NPCM8XX support 2022-08-19 11:03:30 +02:00
Makefile staging: octeon-usb: move driver out of staging 2022-06-21 16:43:37 +02: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 usb: host: {e|o}hci-dbg: kill useless 'ret' variable initializers 2022-02-15 15:11:20 +01:00
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: host: ohci-ppc-of: Fix refcount leak bug 2022-06-21 16:38:53 +02: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 headers/prep: Fix non-standard header section: drivers/usb/host/ohci-tmio.c 2022-01-05 16:18:11 +01:00
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/host: fix repeated words in comments 2022-07-27 14:33:33 +02: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 Revert "xhci: turn off port power in shutdown" 2022-08-25 17:48:30 +02: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: add support optional controller reset 2022-06-10 11:50:05 +02: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 runtime PM as default policy on all xHC 1.2 or later devices 2022-10-25 19:53:41 +02: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: Fix comment typo 2022-07-27 14:36:39 +02: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: Add quirk to reset host back to default state at shutdown 2022-10-25 19:53:41 +02:00
xhci.h xhci: Add quirk to reset host back to default state at shutdown 2022-10-25 19:53:41 +02:00