linux/drivers/net/wireless/quantenna/qtnfmac
Runyu Xiao 5a9c554ff8 wifi: qtnfmac: topaz: defer IRQ enabling until IPC init
qtnf_pcie_topaz_probe() currently calls devm_request_irq() and only then
disable_irq(). request_irq() installs the action in the irq core
immediately, so qtnf_pcie_topaz_interrupt() can run before the Topaz
private IRQ consumers are initialized, if the hardware misbehaves.

This window is reachable on a running system as soon as probe has
successfully registered pdev->irq but before qtnf_pcie_init_shm_ipc()
sets shm_ipc_ep_in/out.irq_handler. If an interrupt is delivered in
this interval, qtnf_pcie_topaz_interrupt() calls
qtnf_shm_ipc_irq_handler() for shm_ipc_ep_in/out while their irq_handler
callbacks are still unset, so the driver can observe an early IRQ
before its IPC consumer state is ready.

The issue was found on Linux v6.18.21 by our static analysis tool while
scanning request_irq()/disable_irq() registration-order bugs in
wireless PCIe drivers, and then manually reviewed.

Request the IRQ with IRQF_NO_AUTOEN instead and keep the existing
enable_irq() in qtnf_post_init_ep() as the point where interrupts
become visible. This closes the early-IRQ window while preserving the
intended bring-up order.

Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Link: https://patch.msgid.link/20260531145435.701703-1-runyu.xiao@seu.edu.cn
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-06-03 14:11:56 +02:00
..
pcie wifi: qtnfmac: topaz: defer IRQ enabling until IPC init 2026-06-03 14:11:56 +02:00
bus.h wifi: qtnfmac: allocate dummy net_device dynamically 2024-03-21 17:09:25 +02:00
cfg80211.c wifi: cfg80211: support key installation on non-netdev wdevs 2026-03-02 11:28:33 +01:00
cfg80211.h qtnfmac: convert to SPDX license identifiers 2019-02-01 14:12:02 +02:00
commands.c wifi: cfg80211: move AP HT/VHT/... operation to beacon info 2026-04-28 09:29:02 +02:00
commands.h qtnfmac: support WPA3 OWE in AP mode 2020-03-12 15:38:56 +02:00
core.c qtnfmac: use alloc_netdev macro for single queue devices 2026-03-19 09:08:09 +01:00
core.h wifi: qtnfmac: fix spelling error in core.h 2024-12-12 20:01:33 +02:00
debug.c qtnfmac: modify debugfs to support multiple cards 2019-04-26 14:53:13 +03:00
debug.h qtnfmac: convert to SPDX license identifiers 2019-02-01 14:12:02 +02:00
event.c wifi: nl80211/cfg80211: support stations of non-netdev interfaces 2026-03-02 09:23:03 +01:00
event.h qtnfmac: convert to SPDX license identifiers 2019-02-01 14:12:02 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile qtnfmac: add support for Topaz chipsets 2018-11-06 18:53:50 +02:00
qlink_util.c qtnfmac: set valid edmg in cfg80211_chan_def 2020-03-12 15:38:57 +02:00
qlink_util.h qtnfmac: drop unnecessary TLVs from scan command 2020-02-12 18:16:48 +02:00
qlink.h wifi: qtnfmac: Avoid multiple -Wflex-array-member-not-at-end warnings 2025-02-11 11:58:34 +01:00
qtn_hw_ids.h qtnfmac: convert to SPDX license identifiers 2019-02-01 14:12:02 +02:00
shm_ipc_defs.h qtnfmac: convert to SPDX license identifiers 2019-02-01 14:12:02 +02:00
shm_ipc.c qtnfmac: convert to SPDX license identifiers 2019-02-01 14:12:02 +02:00
shm_ipc.h qtnfmac: convert to SPDX license identifiers 2019-02-01 14:12:02 +02:00
switchdev.h qtnfmac: signal that all packets coming from device are already flooded 2019-11-20 09:42:59 +02:00
trans.c qtnfmac: convert to SPDX license identifiers 2019-02-01 14:12:02 +02:00
trans.h qtnfmac: convert to SPDX license identifiers 2019-02-01 14:12:02 +02:00
util.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
util.h qtnfmac: convert to SPDX license identifiers 2019-02-01 14:12:02 +02:00