From: Johannes Berg If we fail to register the inet/inet6 address notifiers, wiphy_unregister() is called before removing interface, but the default interface already exists at this point. This could also lead to a deadlock as wiphy_unregister() then waits for the interface to go away. Change the order to remove the interfaces first. Assisted-by: LLM Signed-off-by: Johannes Berg --- net/mac80211/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 28480f983932..76e85754deff 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -1683,12 +1683,12 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) #if defined(CONFIG_INET) || defined(CONFIG_IPV6) fail_ifa: #endif - wiphy_unregister(local->hw.wiphy); - fail_wiphy_register: - fail_band: rtnl_lock(); ieee80211_remove_interfaces(local); rtnl_unlock(); + wiphy_unregister(local->hw.wiphy); + fail_wiphy_register: + fail_band: rate_control_deinitialize(local); fail_rate: ieee80211_txq_teardown_flows(local); -- 2.56.0