Skip to contentSkip to conversation

mac80211: fix rcu locking

PATCH New Johannes Berg 1 participant 1 message Nov 20, 2009 mac80211

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 mac80211: fix rcu locking

Add a missing rcu_read_unlock() before jumping out of the ieee80211_change_station() function in the error case.

---
*points finger at*

commit fed1557d868e3a15b8a10700f79353e1f362e3a1
Author: Felix Fietkau <[email protected]>
Date: Tue Nov 10 20:10:05 2009 +0100

mac80211: implement support for 4-address frames for AP and client mode

 net/mac80211/cfg.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
net/mac80211/cfg.c +3 -1
@@ -818,8 +818,10 @@ static int ieee80211_change_station(stru
 		}
 
 		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);
 		}