summaryrefslogtreecommitdiffstats
path: root/net/mac80211/chan.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2014-01-29 07:56:20 +0100
committerJohannes Berg <johannes.berg@intel.com>2014-02-04 21:58:10 +0100
commitcc901de1bcb0372583466075bfa62e3049dc6288 (patch)
treeae12805ea7a7e39e55e811fcc15c9b12a68fe078 /net/mac80211/chan.c
parentc46a73f39642db4931544a9376338d05aa196df8 (diff)
downloadop-kernel-dev-cc901de1bcb0372583466075bfa62e3049dc6288.zip
op-kernel-dev-cc901de1bcb0372583466075bfa62e3049dc6288.tar.gz
mac80211: fix sdata->radar_required locking
radar_required setting wasn't protected by local->mtx in some places. This should prevent from scanning/radar detection/roc colliding. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/chan.c')
-rw-r--r--net/mac80211/chan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index f43613a..42c6592 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -196,6 +196,8 @@ static bool ieee80211_is_radar_required(struct ieee80211_local *local)
{
struct ieee80211_sub_if_data *sdata;
+ lockdep_assert_held(&local->mtx);
+
rcu_read_lock();
list_for_each_entry_rcu(sdata, &local->interfaces, list) {
if (sdata->radar_required) {
OpenPOWER on IntegriCloud