linux/drivers/net
Charlie-cy Wu d6e7d57ed9 wifi: mt76: mt7921: refactor regd update to fix recursive mutex deadlock
Split mt7921_mcu_regd_update() into two functions to prevent recursive
mutex acquisition. Introduce __mt7921_mcu_regd_update() as the internal
implementation that assumes the mutex is already held by the caller,
while mt7921_mcu_regd_update() remains as the external interface that
handles mutex acquisition and release.

This fixes a deadlock issue when mt7921_regd_set_6ghz_power_type() is
called with the device mutex already held. Without this change, calling
mt7921_mcu_regd_update() would attempt to acquire the same mutex again,
causing a recursive lock deadlock.

The __mt7921_mcu_regd_update() function can be safely called when the
caller has already acquired the device mutex, avoiding the deadlock
while maintaining proper synchronization for regulatory domain updates.

Fixes: dc2608cf5224 ("wifi: mt76: mt7921: refactor regulatory notifier flow")
Signed-off-by: Charlie-cy Wu <Charlie-cy.Wu@mediatek.com>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Tested-by: Devin Wittmayer <lucid_duck@justthetip.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-08-16 11:07:18 -07:00
..
arcnet net: arcnet: com20020-pci: avoid -Wformat-truncation warning 2026-05-22 17:20:57 -07:00
bonding bonding: alb: re-check primary_is_promisc under RTNL in bond_alb_monitor 2026-07-30 16:16:48 -07:00
can can: ems_usb: validate CPC message lengths 2026-07-29 12:00:18 +02:00
dsa net: dsa: realtek: use devm_mutex_init for l2_lock 2026-07-29 18:42:27 -07:00
ethernet net: ethernet: ti: am65-cpsw-nuss: Fix port_id extraction from SRC TAG 2026-08-12 17:36:19 -07:00
fddi FDDI: defza: Sanitise the reset safety timer 2026-05-13 17:31:01 -07:00
fjes
hyperv hv_netvsc: use kmap_local_page in netvsc_copy_to_send_buf 2026-06-09 13:16:30 +02:00
ieee802154 Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
ipa net: ipa: fix SMEM state handle leaks in SMP2P init 2026-06-26 18:40:04 -07:00
ipvlan ipvlan: inherit needed_headroom and needed_tailroom from phy_dev 2026-08-10 15:20:06 -07:00
mctp mctp: serial: handle zero-length frames to prevent rx buffer overflow 2026-07-23 15:34:00 +02:00
mdio Including fixes from netfilter, Bluetooth and batman-adv. 2026-07-09 08:26:51 -07:00
netdevsim netdevsim: remove ethtool debugfs files before freeing netdev 2026-06-29 18:47:23 -07:00
ovpn ovpn: defer key slot crypto freeing to workqueue 2026-08-09 22:47:57 +02:00
pcs net: pcs: xpcs: fix SGMII state reading 2026-07-23 08:22:21 -07:00
phy net: phy: realtek: fix EEE advertisement write on the internal PHY MMD path 2026-08-10 16:05:05 -07:00
plip
ppp pppoe: reload header pointer after dev_hard_header() 2026-07-23 07:01:53 -07:00
pse-pd net: pse-pd: scope pse_control regulator handle to kref lifetime 2026-06-26 18:43:09 -07:00
slip net: slip: serialize receive against buffer reallocation 2026-07-23 09:06:48 -07:00
team net: team: don't recurse on the port's netdev ops lock 2026-06-04 14:04:55 -07:00
thunderbolt net: thunderbolt: Tear down DMA paths before stopping the rings 2026-08-06 08:19:53 -07:00
usb net: usb: ipheth: fix carrier_work UAF on disconnect 2026-08-06 08:21:57 -07:00
vmxnet3 vmxnet3: fix BUG_ON in vmxnet3_get_hdr_len() for Geneve packets 2026-07-22 13:52:44 -07:00
vxlan vxlan: do not arm the ageing timer on a device that is down 2026-08-11 11:42:52 +02:00
wan wan: wanxl: Only reset hardware after BAR mapping 2026-07-21 13:12:43 +02:00
wireguard Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-06-01 13:42:12 +02:00
wireless wifi: mt76: mt7921: refactor regd update to fix recursive mutex deadlock 2026-08-16 11:07:18 -07:00
wwan Split <linux/mod_devicetable.h> in per subsystem headers 2026-07-02 20:54:26 -10:00
xen-netback
amt.c amt: fix use-after-free in AMT delayed works 2026-07-23 07:00:35 -07:00
bareudp.c bareudp: Use rtnl_dereference() in bareudp_sock_release(). 2026-05-20 19:12:29 -07:00
dummy.c net: change ndo_set_rx_mode_async return type to int 2026-06-09 18:15:29 -07:00
eql.c
geneve.c geneve: require CAP_NET_ADMIN in the device netns for changelink 2026-07-23 08:17:09 -07:00
gtp.c gtp: check skb_pull_data() return in gtp1u_send_echo_resp() 2026-07-21 15:02:29 -07:00
ifb.c net: ifb: report ethtool stats over num_tx_queues 2026-05-14 18:40:04 -07:00
Kconfig ne2k: fold drivers/net/Space.c into ne.c 2026-05-01 16:46:53 -07:00
LICENSE.SRC
loopback.c
macsec.c macsec: fix promiscuity refcount leak in macsec_dev_open() 2026-07-11 12:52:15 +02:00
macvlan.c macvlan: inherit needed_headroom and needed_tailroom from lowerdev 2026-08-10 15:21:41 -07:00
macvtap.c kernfs: pass struct ns_common instead of const void * for namespace tags 2026-04-09 14:36:52 +02:00
Makefile ne2k: fold drivers/net/Space.c into ne.c 2026-05-01 16:46:53 -07:00
mdio.c
mhi_net.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
mii.c
net_failover.c net: net_failover: Fix the deadlock in slave register 2026-05-13 19:01:03 -07:00
netconsole.c netconsole: don't drop the last byte of a full-sized message 2026-06-18 18:08:41 -07:00
netkit.c net: change ndo_set_rx_mode_async return type to int 2026-06-09 18:15:29 -07:00
nlmon.c
ntb_netdev.c NTB: ntb_netdev: Preserve RX queue depth on allocation failure 2026-08-11 11:04:55 +02:00
pfcp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-06-16 14:59:58 -07:00
rionet.c
sungem_phy.c
tap.c net: tap: fix wrong transport_header when sending VLAN-tagged frame 2026-08-11 13:14:00 +02:00
tun_vnet.h
tun.c Revert "tun/tap: add ptr_ring consume helper with netdev queue wakeup" 2026-07-29 17:12:27 -07:00
veth.c veth: fix queue index used to wake the peer txq in veth_poll 2026-08-10 15:57:47 -07:00
virtio_net.c virtio_net: disable cb when NAPI is busy-polled 2026-06-30 17:03:37 -07:00
vrf.c vrf: Fix a potential NPD when removing a port from a VRF 2026-04-27 17:43:22 -07:00
vsockmon.c
xen-netfront.c