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>
This commit is contained in:

committed by
John W. Linville

parent
6b914c5216
commit
b16bd15c37
@@ -600,8 +600,7 @@ struct ieee80211_local {
|
||||
/*
|
||||
* The lock only protects the list, hash, timer and counter
|
||||
* against manipulation, reads are done in RCU. Additionally,
|
||||
* the lock protects each BSS's TIM bitmap, a few items in
|
||||
* STA info structures and various key pointers.
|
||||
* the lock protects each BSS's TIM bitmap.
|
||||
*/
|
||||
spinlock_t sta_lock;
|
||||
unsigned long num_sta;
|
||||
@@ -635,6 +634,13 @@ struct ieee80211_local {
|
||||
|
||||
struct list_head interfaces;
|
||||
|
||||
/*
|
||||
* Key lock, protects sdata's key_list and sta_info's
|
||||
* key pointers (write access, they're RCU.)
|
||||
*/
|
||||
spinlock_t key_lock;
|
||||
|
||||
|
||||
bool sta_sw_scanning;
|
||||
bool sta_hw_scanning;
|
||||
int scan_channel_idx;
|
||||
|
Reference in New Issue
Block a user