diff options
author | Jouni Malinen <j@w1.fi> | 2010-03-06 18:35:08 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-10 16:16:54 -0500 |
commit | 38a679a52be13d5a0c766597ab823e06688d6e8e (patch) | |
tree | 56e6e769ff0dd38264bbb1462562761824701925 /net/mac80211/sta_info.c | |
parent | e5a9a35cb9c0d92d7c986cb3696fb794be100087 (diff) |
mac80211: Fix sta_mtx unlocking on insert STA failure path
Commit 34e895075e21be3e21e71d6317440d1ee7969ad0 introduced sta_mtx
locking into sta_info_insert() (now sta_info_insert_rcu), but forgot
to unlock this mutex on one of the error paths. Fix this by adding
the missing mutex_unlock() call for the case where STA insert fails
due to an entry existing already. This may happen at least in AP mode
when a STA roams between two BSSes (vifs).
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 211c475f73c..56422d89435 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -434,6 +434,7 @@ int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU) /* 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; |