Skip to content

Commit

Permalink
mac80211: fix rcu locking
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Nov 23, 2009
1 parent f1cf2db commit 3305443
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 3305443

Please sign in to comment.