linux-stable/drivers
Sergey Senozhatsky 0a3011d47d thunderbolt: Do not double dequeue a configuration request
commit 0f73628e9d upstream.

Some of our devices crash in tb_cfg_request_dequeue():

 general protection fault, probably for non-canonical address 0xdead000000000122

 CPU: 6 PID: 91007 Comm: kworker/6:2 Tainted: G U W 6.6.65
 RIP: 0010:tb_cfg_request_dequeue+0x2d/0xa0
 Call Trace:
 <TASK>
 ? tb_cfg_request_dequeue+0x2d/0xa0
 tb_cfg_request_work+0x33/0x80
 worker_thread+0x386/0x8f0
 kthread+0xed/0x110
 ret_from_fork+0x38/0x50
 ret_from_fork_asm+0x1b/0x30

The circumstances are unclear, however, the theory is that
tb_cfg_request_work() can be scheduled twice for a request:
first time via frame.callback from ring_work() and second
time from tb_cfg_request().  Both times kworkers will execute
tb_cfg_request_dequeue(), which results in double list_del()
from the ctl->request_queue (the list poison deference hints
at it: 0xdead000000000122).

Do not dequeue requests that don't have TB_CFG_REQUEST_ACTIVE
bit set.

Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: stable@vger.kernel.org
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-27 11:04:00 +01:00
..
accessibility
acpi ACPI: HED: Always initialize before evged 2025-06-04 14:37:04 +02:00
amba
android
ata
atm
auxdisplay
base
bcma
block
bluetooth
bus
cdrom
char tpm: tis: Double the timeout B to 4s 2025-06-04 14:37:09 +02:00
clk clk: imx8mp: inform CCF of maximum frequency of clocks 2025-06-04 14:37:02 +02:00
clocksource clocksource: mips-gic-timer: Enable counter when CPUs start 2025-06-04 14:37:03 +02:00
connector
counter
cpufreq acpi-cpufreq: Fix nominal_freq units to KHz in get_max_boost_ratio() 2025-06-27 11:04:00 +01:00
cpuidle cpuidle: menu: Avoid discarding useful information 2025-06-04 14:37:03 +02:00
crypto
dax
dca
devfreq
dio
dma
dma-buf
edac EDAC/ie31200: work around false positive build warning 2025-06-04 14:37:04 +02:00
eisa
extcon
firewire
firmware
fpga fpga: altera-cvp: Increase credit timeout 2025-06-04 14:37:02 +02:00
fsi
gnss
gpio
gpu drm/i915/gvt: fix unterminated-string-initialization warning 2025-06-04 14:37:08 +02:00
greybus
hid HID: quirks: Add ADATA XPG alpha wireless mouse support 2025-06-04 14:37:09 +02:00
hsi
hv
hwmon hwmon: (xgene-hwmon) use appropriate type for the latency value 2025-06-04 14:37:05 +02:00
hwspinlock
hwtracing
i2c i2c: pxa: fix call balance of i2c->clk handling routines 2025-06-04 14:37:00 +02:00
i3c
ide
idle
iio
infiniband
input
interconnect
iommu
ipack
irqchip
isdn
leds
lightnvm
macintosh
mailbox
mcb
md dm cache: prevent BUG_ON by blocking retries on failed device resumes 2025-06-04 14:37:01 +02:00
media media: v4l: Memset argument to 0 before calling get_mbus_config pad op 2025-06-04 14:37:04 +02:00
memory
memstick
message
mfd
misc
mmc mmc: sdhci: Disable SD card clock before changing parameters 2025-06-04 14:37:01 +02:00
most
mtd
mux
net net: dwmac-sun8i: Use parsed internal PHY address instead of 1 2025-06-04 14:37:07 +02:00
nfc
ntb
nubus
nvdimm libnvdimm/labels: Fix divide error in nd_label_data_init() 2025-06-04 14:36:59 +02:00
nvme nvmet-tcp: don't restore null sk_state_change 2025-06-04 14:37:06 +02:00
nvmem
of
opp
oprofile
parisc
parport
pci PCI: Fix old_size lower bound in calculate_iosize() too 2025-06-04 14:37:04 +02:00
pcmcia
perf perf/arm-cmn: Initialise cmn->cpu earlier 2025-06-04 14:37:09 +02:00
phy phy: core: don't require set_mode() callback for phy_get_mode() to work 2025-06-04 14:37:05 +02:00
pinctrl pinctrl: armada-37xx: set GPIO output value before setting direction 2025-06-27 11:04:00 +01:00
platform platform/x86: thinkpad_acpi: Ignore battery threshold change event notification 2025-06-04 14:37:09 +02:00
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: ad5398: Add device tree support 2025-06-04 14:37:06 +02:00
remoteproc
reset
rpmsg
rtc rtc: ds1307: stop disabling alarms on probe 2025-06-04 14:37:01 +02:00
s390
sbus
scsi scsi: st: Restore some drive settings after reset 2025-06-04 14:37:05 +02:00
sfi
sh
siox
slimbus
soc soc: ti: k3-socinfo: Do not use syscon helper to build regmap 2025-06-04 14:37:03 +02:00
soundwire
spi spi: spi-sun4i: fix early activation 2025-06-04 14:37:09 +02:00
spmi
ssb
staging
target
tc
tee
thermal
thunderbolt thunderbolt: Do not double dequeue a configuration request 2025-06-27 11:04:00 +01:00
tty
uio
usb usb: usbtmc: Fix timeout value in get_stb 2025-06-27 11:04:00 +01:00
vdpa
vfio
vhost
video
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen xen/swiotlb: relax alignment requirements 2025-06-04 14:37:09 +02:00
zorro
Kconfig
Makefile