* [PATCH] mac80211: lock sdata in ieee80211_csa_connection_drop_work()
@ 2013-12-11 18:39 Luciano Coelho
2013-12-16 12:39 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Luciano Coelho @ 2013-12-11 18:39 UTC (permalink / raw)
To: linux-wireless, johannes; +Cc: sw
We call ieee80211_ibss_disconnect(), which requires sdata to be
locked, so lock the sdata during ieee80211_csa_connection_drop_work().
Cc: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
---
net/mac80211/ibss.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index df21e4f..94e5c76 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -753,12 +753,16 @@ static void ieee80211_csa_connection_drop_work(struct work_struct *work)
container_of(work, struct ieee80211_sub_if_data,
u.ibss.csa_connection_drop_work);
+ sdata_lock(sdata);
+
ieee80211_ibss_disconnect(sdata);
synchronize_rcu();
skb_queue_purge(&sdata->skb_queue);
/* trigger a scan to find another IBSS network to join */
ieee80211_queue_work(&sdata->local->hw, &sdata->work);
+
+ sdata_unlock(sdata);
}
static void ieee80211_ibss_csa_mark_radar(struct ieee80211_sub_if_data *sdata)
--
1.8.5.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mac80211: lock sdata in ieee80211_csa_connection_drop_work()
2013-12-11 18:39 [PATCH] mac80211: lock sdata in ieee80211_csa_connection_drop_work() Luciano Coelho
@ 2013-12-16 12:39 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2013-12-16 12:39 UTC (permalink / raw)
To: Luciano Coelho; +Cc: linux-wireless, sw
On Wed, 2013-12-11 at 20:39 +0200, Luciano Coelho wrote:
> We call ieee80211_ibss_disconnect(), which requires sdata to be
> locked, so lock the sdata during ieee80211_csa_connection_drop_work().
Applied.
johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-16 12:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-11 18:39 [PATCH] mac80211: lock sdata in ieee80211_csa_connection_drop_work() Luciano Coelho
2013-12-16 12:39 ` 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).