Skip to contentSkip to conversation

mac80211_hwsim: Fix bcn_en_iter to use atomic iteration

PATCH Applied Jouni Malinen 2 participants 2 messages Nov 6, 2013 – Nov 12, 2013 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/wireless/mac80211_hwsim.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mac80211_hwsim.c +1 -1
index de0df86..67628a7 100644
@@ -1230,7 +1230,7 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw,
 					      HRTIMER_MODE_REL);
 		} else if (!info->enable_beacon) {
 			unsigned int count = 0;
-			ieee80211_iterate_active_interfaces(
+			ieee80211_iterate_active_interfaces_atomic(
 				data->hw, IEEE80211_IFACE_ITER_NORMAL,
 				mac80211_hwsim_bcn_en_iter, &count);
 			wiphy_debug(hw->wiphy, "  beaconing vifs remaining: %u",
Signature · 5 lines
1.7.9.5


-- 
Jouni Malinen                                            PGP id EFC895FA
maintainer Applied
#1 lore raw
Quoted 5 lines · Jouni Malinen

'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.

Applied. Since I have to rebase the tree anyway, I've put it into mac80211-next for now.

johannes