diff mbox

mac80211: Fix sta_mtx unlocking on insert STA failure path

Message ID 20100306163508.GA9236@jm.kir.nu (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Jouni Malinen March 6, 2010, 4:35 p.m. UTC
None
diff mbox

Patch

--- wireless-testing.orig/net/mac80211/sta_info.c	2010-03-06 17:53:12.000000000 +0200
+++ wireless-testing/net/mac80211/sta_info.c	2010-03-06 17:54:04.000000000 +0200
@@ -434,6 +434,7 @@  int sta_info_insert_rcu(struct sta_info 
 	/* check if STA exists already */
 	if (sta_info_get_bss(sdata, sta->sta.addr)) {
 		spin_unlock_irqrestore(&local->sta_lock, flags);
+		mutex_unlock(&local->sta_mtx);
 		rcu_read_lock();
 		err = -EEXIST;
 		goto out_free;