Skip to contentSkip to conversation

mac80211: fix spinlock recursion on sta expiration

PATCH In review Luis Carlos Cobo 2 participants 2 messages Apr 1, 2008 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: fix spinlock recursion on sta expiration

---
 net/mac80211/ieee80211_sta.c |    2 +-
 net/mac80211/sta_info.c      |    2 +-
 net/mac80211/sta_info.h      |    1 +
 3 files changed, 3 insertions(+), 2 deletions(-)
net/mac80211/ieee80211_sta.c +1 -1
index f9cf2f1..cfe6fcc 100644
@@ -3081,7 +3081,7 @@ static void ieee80211_sta_expire(struct net_device *dev, unsigned long exp_time)
 		if (time_after(jiffies, sta->last_rx + exp_time)) {
 			printk(KERN_DEBUG "%s: expiring inactive STA %s\n",
 			       dev->name, print_mac(mac, sta->addr));
-			sta_info_unlink(&sta);
+			__sta_info_unlink(&sta);
 			if (sta)
 				list_add(&sta->list, &tmp_list);
 		}
net/mac80211/sta_info.c +1 -1
index f708367..ba02b43 100644
@@ -409,7 +409,7 @@ static struct sta_info *__sta_info_unpin(struct sta_info *sta)
 	return ret;
 }
 
-static void __sta_info_unlink(struct sta_info **sta)
+void __sta_info_unlink(struct sta_info **sta)
 {
 	struct ieee80211_local *local = (*sta)->local;
 	struct ieee80211_sub_if_data *sdata = (*sta)->sdata;
net/mac80211/sta_info.h +1 -0
index 5e39a41..d4d6dcb 100644
@@ -347,6 +347,7 @@ int sta_info_insert(struct sta_info *sta);
  * has already unlinked it.
  */
 void sta_info_unlink(struct sta_info **sta);
+void __sta_info_unlink(struct sta_info **sta);
 
 void sta_info_destroy(struct sta_info *sta);
 void sta_info_set_tim_bit(struct sta_info *sta);
Signature · 1 line
1.5.4.3
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 1 line · Luis Carlos Cobo

Woah. Good catch. I hope it doesn't conflict with the other fixes I just posted.

Quoted 44 lines
---
 net/mac80211/ieee80211_sta.c |    2 +-
 net/mac80211/sta_info.c      |    2 +-
 net/mac80211/sta_info.h      |    1 +
 3 files changed, 3 insertions(+), 2 deletions(-)
net/mac80211/ieee80211_sta.c +1 -1
index f9cf2f1..cfe6fcc 100644
@@ -3081,7 +3081,7 @@ static void ieee80211_sta_expire(struct net_device *dev, unsigned long exp_time)
 		if (time_after(jiffies, sta->last_rx + exp_time)) {
 			printk(KERN_DEBUG "%s: expiring inactive STA %s\n",
 			       dev->name, print_mac(mac, sta->addr));
-			sta_info_unlink(&sta);
+			__sta_info_unlink(&sta);
 			if (sta)
 				list_add(&sta->list, &tmp_list);
 		}
net/mac80211/sta_info.c +1 -1
index f708367..ba02b43 100644
@@ -409,7 +409,7 @@ static struct sta_info *__sta_info_unpin(struct sta_info *sta)
 	return ret;
 }
 
-static void __sta_info_unlink(struct sta_info **sta)
+void __sta_info_unlink(struct sta_info **sta)
 {
 	struct ieee80211_local *local = (*sta)->local;
 	struct ieee80211_sub_if_data *sdata = (*sta)->sdata;
net/mac80211/sta_info.h +1 -0
index 5e39a41..d4d6dcb 100644
@@ -347,6 +347,7 @@ int sta_info_insert(struct sta_info *sta);
  * has already unlinked it.
  */
 void sta_info_unlink(struct sta_info **sta);
+void __sta_info_unlink(struct sta_info **sta);
 
 void sta_info_destroy(struct sta_info *sta);
 void sta_info_set_tim_bit(struct sta_info *sta);