linux/drivers/thunderbolt
Mika Westerberg 9cbc63400f thunderbolt: Initialize ->domain_released completion before it is being used
Both Woody and Marek reported following crash:

 BUG: unable to handle page fault for address: fffffffffffffff8
 Call Trace:
  <TASK>
  device_release+0x43/0x90
  kobject_cleanup+0x3c/0x180
  icm_probe+0x19c/0x550 [thunderbolt]
  nhi_probe+0x1a4/0x370 [thunderbolt]
  local_pci_probe+0x41/0x90
  pci_call_probe+0x5b/0x1a0
  ...

This only triggers on the error path when icm_probe() fails and the
domain structure is released, it tries to complete() uninitialized
completion.

Fix this by initializing the completion earlier.

Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Closes: https://lore.kernel.org/linux-usb/amdezCBiW4fd_DuB@mail-itl/
Reported-by: Woody Suwalski <terraluna977@gmail.com>
Tested_by: Woody Suwalski <terraluna977@gmail.com>
Closes: https://lore.kernel.org/linux-usb/62caf7f8-b403-d0dd-15bc-b31b56f71c28@gmail.com/
Fixes: f5cc545f59 ("thunderbolt: Wait for tb_domain_release() to complete when driver is removed")
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2026-07-30 06:47:32 +02:00
..
acpi.c thunderbolt: Move pci_device out of tb_nhi 2026-05-21 14:29:05 +02:00
cap.c thunderbolt: Update cap.c function documentation 2025-09-17 07:32:58 +02:00
clx.c thunderbolt: Update clx.c function documentation 2025-09-17 07:32:58 +02:00
configfs.c thunderbolt: Add support for ConfigFS 2026-05-19 14:20:18 +02:00
ctl.c thunderbolt: Move pci_device out of tb_nhi 2026-05-21 14:29:05 +02:00
ctl.h thunderbolt: Add missing documentation in ctl.h tb_cfg_request struct 2025-09-17 07:32:58 +02:00
debugfs.c thunderbolt: debugfs: Fix sideband write size check 2026-06-08 12:47:28 +02:00
dma_port.c thunderbolt: dma_port: kmalloc_array + kzalloc to flex 2026-03-18 14:31:56 +01:00
dma_port.h thunderbolt: Convert rest of the driver files to use SPDX identifier 2018-10-02 15:52:08 -07:00
dma_test.c thunderbolt / net: Let the service drivers configure interrupt throttling 2026-05-19 14:20:18 +02:00
domain.c thunderbolt: Move pci_device out of tb_nhi 2026-05-21 14:29:05 +02:00
eeprom.c thunderbolt: Bound the DROM dual link port number before indexing sw->ports 2026-07-27 11:58:54 +02:00
icm.c thunderbolt: icm: Preserve USB4 proxy data-valid bit 2026-07-27 13:04:09 +02:00
Kconfig thunderbolt: Add support for USB4STREAM 2026-05-19 14:20:18 +02:00
lc.c thunderbolt: Fix typos in lc.c 2025-11-17 08:24:23 +01:00
Makefile thunderbolt: Separate out common NHI bits 2026-05-21 14:29:05 +02:00
nhi_regs.h thunderbolt / net: Let the service drivers configure interrupt throttling 2026-05-19 14:20:18 +02:00
nhi.c thunderbolt: Initialize ->domain_released completion before it is being used 2026-07-30 06:47:32 +02:00
nhi.h thunderbolt: Separate out common NHI bits 2026-05-21 14:29:05 +02:00
nvm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
path.c thunderbolt: Activate path hops from source to destination 2026-05-20 11:54:34 +02:00
pci.c thunderbolt: Separate out common NHI bits 2026-05-21 14:29:05 +02:00
property.c USB/Thunderbolt driver changes for 7.2-rc1 2026-06-22 12:09:47 -07:00
quirks.c thunderbolt: Disable CLx on Titan Ridge-based devices with old firmware 2026-03-02 07:51:58 +01:00
retimer.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sb_regs.h thunderbolt: debugfs: Implement asymmetric lane margining 2024-11-01 07:55:38 +02:00
stream.c thunderbolt: stream: Unmap buffers with mapped size 2026-07-27 11:58:54 +02:00
switch.c thunderbolt: Require nhi->ops be valid 2026-05-21 14:29:05 +02:00
tb_msgs.h thunderbolt: Notify userspace about firmware CM tunneling events 2025-04-24 08:24:39 +03:00
tb_regs.h thunderbolt: Increase Notification Timeout to 255 ms for USB4 routers 2026-05-20 11:54:35 +02:00
tb.c thunderbolt: Fix bandwidth group reservation indexing 2026-07-27 11:58:54 +02:00
tb.h thunderbolt: Move pci_device out of tb_nhi 2026-05-21 14:29:05 +02:00
test.c thunderbolt: test: Release third DP tunnel 2026-06-01 12:37:32 +02:00
tmu.c thunderbolt: Fix typos in tmu.c 2025-11-17 08:24:24 +01:00
trace.h thunderbolt: Correct trace output of firmware connection manager packets 2024-04-29 07:47:54 +03:00
tunnel.c thunderbolt: Verify PCIe adapter in detect state before tunnel setup 2026-05-20 11:54:34 +02:00
tunnel.h thunderbolt: tunnel: Simplify allocation 2026-04-07 09:00:26 +02:00
usb4_port.c thunderbolt: Move pci_device out of tb_nhi 2026-05-21 14:29:05 +02:00
usb4.c thunderbolt: Increase timeout for Configuration Ready bit 2026-05-20 11:54:34 +02:00
xdomain.c USB/Thunderbolt driver changes for 7.2-rc1 2026-06-22 12:09:47 -07:00