linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211_hwsim: Fix bcn_en_iter to use atomic iteration
@ 2013-11-06 10:06 Jouni Malinen
  2013-11-12  9:44 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Jouni Malinen @ 2013-11-06 10:06 UTC (permalink / raw)
  To: John W. Linville, Johannes Berg; +Cc: linux-wireless

'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>
---
 drivers/net/wireless/mac80211_hwsim.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index de0df86..67628a7 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -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",
-- 
1.7.9.5


-- 
Jouni Malinen                                            PGP id EFC895FA

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mac80211_hwsim: Fix bcn_en_iter to use atomic iteration
  2013-11-06 10:06 [PATCH] mac80211_hwsim: Fix bcn_en_iter to use atomic iteration Jouni Malinen
@ 2013-11-12  9:44 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2013-11-12  9:44 UTC (permalink / raw)
  To: Jouni Malinen; +Cc: John W. Linville, linux-wireless

On Wed, 2013-11-06 at 12:06 +0200, Jouni Malinen wrote:
> '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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-12  9:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-06 10:06 [PATCH] mac80211_hwsim: Fix bcn_en_iter to use atomic iteration Jouni Malinen
2013-11-12  9:44 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).