diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-04-11 15:40:35 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-04-16 15:59:57 -0400 |
commit | b16bd15c379410f2aa47837aa4a0de5712856ad5 (patch) | |
tree | fd391bb12b146aaf001ae169a4c98f7088299edd /net/mac80211/ieee80211_i.h | |
parent | 6b914c521687ae6cb8923c7235fd69b7bc027703 (diff) |
mac80211: fix spinlock recursion
When STAs are expired, we need to hold the sta_lock. Using
the same lock for keys too would then mean we'd need another
key free function, and that'll just lead to confusion, so just
use a new spinlock for all key lists.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index c642538e8282..ce566f3e0169 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -600,8 +600,7 @@ struct ieee80211_local { | |||
600 | /* | 600 | /* |
601 | * The lock only protects the list, hash, timer and counter | 601 | * The lock only protects the list, hash, timer and counter |
602 | * against manipulation, reads are done in RCU. Additionally, | 602 | * against manipulation, reads are done in RCU. Additionally, |
603 | * the lock protects each BSS's TIM bitmap, a few items in | 603 | * the lock protects each BSS's TIM bitmap. |
604 | * STA info structures and various key pointers. | ||
605 | */ | 604 | */ |
606 | spinlock_t sta_lock; | 605 | spinlock_t sta_lock; |
607 | unsigned long num_sta; | 606 | unsigned long num_sta; |
@@ -635,6 +634,13 @@ struct ieee80211_local { | |||
635 | 634 | ||
636 | struct list_head interfaces; | 635 | struct list_head interfaces; |
637 | 636 | ||
637 | /* | ||
638 | * Key lock, protects sdata's key_list and sta_info's | ||
639 | * key pointers (write access, they're RCU.) | ||
640 | */ | ||
641 | spinlock_t key_lock; | ||
642 | |||
643 | |||
638 | bool sta_sw_scanning; | 644 | bool sta_sw_scanning; |
639 | bool sta_hw_scanning; | 645 | bool sta_hw_scanning; |
640 | int scan_channel_idx; | 646 | int scan_channel_idx; |