mac80211: Don't restart sta-timer if not associated.
PATCH v3 1/1 mac80211: Don't restart sta-timer if not associated.
From: Ben Greear <[email protected]>
I found another crash when deleting lots of virtual stations in a congested environment. I think the problem is that the ieee80211_mlme_notify_scan_completed could call ieee80211_restart_sta_timer for a stopped interface that was about to be deleted.
With the following patch I am unable to reproduce the crash.
---
v3: Just check for sdata-is-running once at top of method
instead of worrying about if it is associated or not.
:100644 100644 aec786d... 74a8c5f... M net/mac80211/mlme.c
net/mac80211/mlme.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
net/mac80211/mlme.c +3 -0
@@ -2933,6 +2933,9 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata) {u32 flags; +if (!ieee80211_sdata_running (sdata)) +return ; +if (sdata->vif.type ==NL80211_IFTYPE_STATION ) {__ieee80211_stop_poll (sdata);
Signature · 1 line
1.7.3.4
Quoted 25 lines · On Tue, Mar 19, 2013 at 05:50:50PM -0700, [email protected] wrote:
From: Ben Greear <[email protected]>
I found another crash when deleting lots of virtual stations in a congested environment. I think the problem is that the
ieee80211_mlme_notify_scan_completedcould callieee80211_restart_sta_timerfor a stopped interface that was about to be deleted.With the following patch I am unable to reproduce the crash.
Signed-off-by Ben Greear <[email protected]>---
v3: Just check for sdata-is-running once at top of method
instead of worrying about if it is associated or not.:100644 100644 aec786d... 74a8c5f... M
net/mac80211/mlme.cnet/mac80211/mlme.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)net/mac80211/mlme.c +0
-0
net/mac80211/mlme.c static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata) · line 2938
Quoted 6 lines
net/mac80211/mlme.c +3
-0@@ -2933,6 +2933,9 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata) {u32 flags; +if (!ieee80211_sdata_running (sdata)) +return ; +
I think this check should go to ieee80211_mlme_notify_scan_completed(), and another one to ieee80211_mesh_notify_scan_completed(), IBSS already has it.
Stanislaw
Johannes Berg
maintainerQuoted 29 lines · Stanislaw Gruszka
Quoted 28 lines · On Tue, Mar 19, 2013 at 05:50:50PM -0700, [email protected] wrote:
From: Ben Greear <[email protected]>
I found another crash when deleting lots of virtual stations in a congested environment. I think the problem is that the
ieee80211_mlme_notify_scan_completedcould callieee80211_restart_sta_timerfor a stopped interface that was about to be deleted.With the following patch I am unable to reproduce the crash.
Signed-off-by Ben Greear <[email protected]>---
v3: Just check for sdata-is-running once at top of method
instead of worrying about if it is associated or not.:100644 100644 aec786d... 74a8c5f... M
net/mac80211/mlme.cnet/mac80211/mlme.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)net/mac80211/mlme.c +0
-0@@ -2933,6 +2933,9 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata) {u32 flags;
Quoted 7 lines
net/mac80211/mlme.c static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata) · line 2938
Quoted 3 lines
net/mac80211/mlme.c +3
-0+if (!ieee80211_sdata_running (sdata)) +return ; +I think this check should go to
ieee80211_mlme_notify_scan_completed(), and another one toieee80211_mesh_notify_scan_completed(), IBSS already has it.
I made these changes and applied it.
johannes