Skip to content

Commit

Permalink
mac80211: lock sdata in ieee80211_csa_connection_drop_work()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Luciano Coelho authored and Johannes Berg committed Dec 16, 2013
1 parent 70dabeb commit 6f07d21
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/mac80211/ibss.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6f07d21

Please sign in to comment.