Re: [PATCH] wifi: mt76: mt7921: refactor regd update to fix recursive mutex deadlock

Devin Wittmayer <[email protected]> Tue, 4 Aug 2026 11:51:18 -0700
Newsgroups org.kernel.vger.linux-wireless,dev.linux.lists.regressions
Message-ID <[email protected]>
This one is still missing from mainline, and the bug it fixes is in 7.2.
Could it go into a fixes pull before the release rather than waiting for
7.3?

Current master still has mt7921_mcu_regd_update() taking dev->mutex
unconditionally, and mt7921_regd_set_6ghz_power_type() still calling it
from mt7921_mac_sta_add(), which runs with that same mutex already held
by mt76_sta_state(). Any mt7921 station that associates to a 6 GHz AP
self-deadlocks. It is not only a warning: wpa_supplicant blocks while
holding the wiphy mutex, so NetworkManager, the cfg80211 workqueue and
new ssh sessions pile up behind it and the machine has to be reset. The
call site arrived in e88098133ed4, which is in v7.2-rc1 and not in v7.1,
so nothing released is affected and no stable backport is needed, but
7.2 would ship it.

I reproduced it on 7.2-rc5 with lockdep on an MT7922, then applied this
patch and repeated the same association. Before, the recursive acquire
fires and the box is gone. After, it associates on 5975 MHz in four
seconds with no splat and nothing left blocked. Nothing else changed
between the two runs.

Tested-by: Devin Wittmayer <[email protected]>

One small thing for whenever it moves: the Fixes tag cites dc2608cf5224,
which is not a mainline commit. The mainline id for "wifi: mt76: mt7921:
refactor regulatory notifier flow" is e88098133ed4.