linux-stable/drivers
Mathias Nyman dda7e89e53 xhci: Fix root hub port null pointer dereference in xhci tracepoints
The pointer from a xhci usb virt device to its root hub port
(vdev->rhub_port) is set later when device is addressed, not while
vdev is allocated.

Tracepoints dereferenced this rhub_port pointer when freeing the virt
device, which causes null pointer dereference if tracing is enabled
and device is freed before addressed.

This can happen if tracing is enabled and xhci driver is unloaded before
a device is fully enumerated, or initial enumeration fails and device
is reset and freed before retry.

Don't dereference the rhub_port or show port numbers when tracing
xhci_free_virt_device(). This info is not very useful anyway.

Print the more useful slot id instead

Fixes: 06790c1908 ("xhci: replace real & fake port with pointer to root hub port")
Reported-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Closes: https://lore.kernel.org/linux-usb/20240402005007.klv2ij727fkz7rpd@synopsys.com/
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20240404121106.2842417-3-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-04 14:54:54 +02:00
..
accel
accessibility Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
acpi Merge branch 'acpica' 2024-03-29 19:00:09 +01:00
amba
android Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
ata scsi: sd: Fix TCG OPAL unlock on system resume 2024-03-25 15:46:12 -04:00
atm
auxdisplay
base Driver core changes for 6.9-rc1 2024-03-21 13:34:15 -07:00
bcma
block block-6.9-20240322 2024-03-22 12:46:07 -07:00
bluetooth TTY/Serial driver update for 6.9-rc1 2024-03-21 12:44:10 -07:00
bus Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
cache
cdrom
cdx
char Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
clk
clocksource A set of updates for clocksource and clockevent drivers: 2024-03-23 14:42:45 -07:00
comedi Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
connector
counter
cpufreq RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
cpuidle RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
crypto This push fixes a regression that broke iwd as well as a divide by 2024-03-25 10:48:23 -07:00
cxl cxl: remove CONFIG_CXL_PMU entry in drivers/cxl/Kconfig 2024-03-27 01:58:34 +09:00
dax
dca
devfreq
dio
dma
dma-buf Merge drm/drm-fixes into drm-misc-fixes 2024-03-25 21:11:58 +01:00
dpll dpll: indent DPLL option type by a tab 2024-03-25 19:40:23 -07:00
edac
eisa
extcon
firewire firewire: core: add memo about the caller of show functions for device attributes 2024-03-21 21:20:18 +09:00
firmware x86/efistub: Reinstate soft limit for initrd loading 2024-03-28 16:19:46 +01:00
fpga Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
fsi
gnss
gpio gpiolib: Fix debug messaging in gpiod_find_and_request() 2024-03-26 12:50:50 +01:00
gpu Kbuild fixes for v6.9 2024-03-31 11:23:51 -07:00
greybus Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
hid
hsi
hte
hv hyperv-next for v6.9 2024-03-21 10:01:02 -07:00
hwmon
hwspinlock
hwtracing
i2c i2c: i801: Fix a refactoring that broke a touchpad on Lenovo P1 2024-03-26 00:47:08 +01:00
i3c
idle
iio Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
infiniband
input TTY/Serial driver update for 6.9-rc1 2024-03-21 12:44:10 -07:00
interconnect
iommu iommu: Validate the PASID in iommu_attach_device_pasid() 2024-03-28 06:38:40 +01:00
ipack
irqchip irqchip/armada-370-xp: Suppress unused-function warning 2024-03-26 02:12:16 +01:00
isdn
leds
macintosh
mailbox
mcb
md dm integrity: fix out-of-range warning 2024-03-29 09:48:07 -04:00
media
memory Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
memstick
message
mfd TTY/Serial driver update for 6.9-rc1 2024-03-21 12:44:10 -07:00
misc hardening fixes for v6.9-rc1 2024-03-23 08:43:21 -07:00
mmc sdhci-of-dwcmshc: disable PM runtime in dwcmshc_remove() 2024-03-25 13:12:46 +01:00
most
mtd This pull request contains updates for UBI and UBIFS: 2024-03-21 15:09:29 -07:00
mux
net Kbuild fixes for v6.9 2024-03-31 11:23:51 -07:00
nfc
ntb
nubus
nvdimm
nvme nvme updates for Linux 6.9 2024-03-21 13:23:07 -06:00
nvmem
of Driver core changes for 6.9-rc1 2024-03-21 13:34:15 -07:00
opp
parisc
parport
pci
pcmcia
peci
perf RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
phy USB/Thunderbolt changes for 6.9-rc1 2024-03-21 12:35:20 -07:00
pinctrl Kbuild fixes for v6.9 2024-03-31 11:23:51 -07:00
platform Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
pmdomain
pnp
power
powercap
pps
ps3
ptp
pwm pwm: img: fix pwm clock lookup 2024-03-25 07:31:26 +01:00
rapidio
ras RAS: Avoid build errors when CONFIG_DEBUG_FS=n 2024-03-26 21:48:21 +01:00
regulator regulator: Fix for v6.9 2024-03-22 09:52:37 -07:00
remoteproc remoteproc updates for v6.9 2024-03-21 10:37:39 -07:00
reset
rpmsg
rtc RTC for 6.9 2024-03-21 17:16:46 -07:00
s390 s390/qeth: handle deferred cc1 2024-03-25 19:46:49 -07:00
sbus
scsi scsi: bnx2fc: Remove spin_lock_bh while releasing resources after upload 2024-03-25 20:47:05 -04:00
sh
siox SIOX changes for 6.9-rc1 2024-03-21 15:18:18 -07:00
slimbus
soc Including fixes from CAN, netfilter, wireguard and IPsec. 2024-03-21 14:50:39 -07:00
soundwire
spi spi: Fixes for v6.9 2024-03-22 09:57:00 -07:00
spmi
ssb
staging staging: vc04_services: fix information leak in create_component() 2024-03-25 19:10:01 +01:00
target Merge branch '6.9/scsi-queue' into 6.9/scsi-fixes 2024-03-25 14:03:35 -04:00
tc
tee
thermal thermal: devfreq_cooling: Fix perf state when calculate dfc res_util 2024-03-27 16:27:39 +01:00
thunderbolt USB/Thunderbolt changes for 6.9-rc1 2024-03-21 12:35:20 -07:00
tty TTY/Serial driver update for 6.9-rc1 2024-03-21 12:44:10 -07:00
ufs Merge branch '6.9/scsi-queue' into 6.9/scsi-fixes 2024-03-25 14:03:35 -04:00
uio Fix build errors due to new UIO_MEM_DMA_COHERENT mess 2024-03-27 09:48:47 -07:00
usb xhci: Fix root hub port null pointer dereference in xhci tracepoints 2024-04-04 14:54:54 +02:00
vdpa
vfio
vhost
video fbdev: Select I/O-memory framebuffer ops for SBus 2024-03-25 21:34:08 +01:00
virt
virtio
w1
watchdog
xen
zorro
Kconfig
Makefile