From: Johannes Berg <johannes.berg@xxxxxxxxx> The call to ieee80211_do_stop() right after will also do synchronize_rcu() to ensure the SDATA_STATE_RUNNING bit is cleared, so we don't need to synchronize_net() here. Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> --- net/mac80211/iface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index dd9ac1f7d2ea..02b71b4e094b 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -1898,8 +1898,7 @@ static int ieee80211_runtime_change_iftype(struct ieee80211_sub_if_data *sdata, ieee80211_stop_vif_queues(local, sdata, IEEE80211_QUEUE_STOP_REASON_IFTYPE_CHANGE); - synchronize_net(); - + /* do_stop will synchronize_rcu() first thing */ ieee80211_do_stop(sdata, false); ieee80211_teardown_sdata(sdata); -- 2.38.1