Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211_hwsim: Fix bcn_en_iter to use atomic iteration

'mac80211_hwsim: Fix tracking of beaconing for multi-vif' introduced an
iteration of active interfaces into the bss_info_changed handler.
However, it used a wrong type of iteration and could result in a dead
lock since iflist_mtx can already be held. Fix this by using the atomic
version of the iteration function.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Jouni Malinen and committed by
Johannes Berg
cdb1b805 3f718fd8

+1 -1
+1 -1
drivers/net/wireless/mac80211_hwsim.c
··· 1238 1238 HRTIMER_MODE_REL); 1239 1239 } else if (!info->enable_beacon) { 1240 1240 unsigned int count = 0; 1241 - ieee80211_iterate_active_interfaces( 1241 + ieee80211_iterate_active_interfaces_atomic( 1242 1242 data->hw, IEEE80211_IFACE_ITER_NORMAL, 1243 1243 mac80211_hwsim_bcn_en_iter, &count); 1244 1244 wiphy_debug(hw->wiphy, " beaconing vifs remaining: %u",