From 3305443c968b98902199bea0abbd9443c6a2bb8d Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 20 Nov 2009 10:09:14 +0100 Subject: [PATCH] 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 Signed-off-by: John W. Linville --- net/mac80211/cfg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index c484a882140e..93ee1fd5c08d 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); } -- 2.30.2