aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-11-20 10:09:14 +0100
committerJohn W. Linville <linville@tuxdriver.com>2009-11-23 17:05:29 -0500
commit3305443c968b98902199bea0abbd9443c6a2bb8d (patch)
tree9a31f5c76c76f97c5d959b4a75a84de2ebf693be
parentf1cf2dbd0f798b71b1590e7aca6647f2caef1649 (diff)
mac80211: fix rcu locking
Add a missing rcu_read_unlock() before jumping out of the ieee80211_change_station() function in the error case. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/cfg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index c484a882140..93ee1fd5c08 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -823,8 +823,10 @@ static int ieee80211_change_station(struct wiphy *wiphy,
}
if (params->vlan->ieee80211_ptr->use_4addr) {
- if (vlansdata->u.vlan.sta)
+ if (vlansdata->u.vlan.sta) {
+ rcu_read_unlock();
return -EBUSY;
+ }
rcu_assign_pointer(vlansdata->u.vlan.sta, sta);
}