Josh Boyer 60b78be
From: Ben Greear <greearb@candelatech.com>
Josh Boyer 60b78be
Josh Boyer 60b78be
I found another crash when deleting lots of virtual stations
Josh Boyer 60b78be
in a congested environment.  I think the problem is that
Josh Boyer 60b78be
the ieee80211_mlme_notify_scan_completed could call
Josh Boyer 60b78be
ieee80211_restart_sta_timer for a stopped interface
Josh Boyer 60b78be
that was about to be deleted.  Fix similar problem for
Josh Boyer 60b78be
mesh interfaces as well.
Josh Boyer 60b78be
Josh Boyer 60b78be
Signed-off-by: Ben Greear <greearb@candelatech.com>
Josh Boyer 60b78be
---
Josh Boyer 60b78be
v4:  Fix up mesh as well, add check in calling code instead of
Josh Boyer 60b78be
    in the methods that mucks iwth the timers.
Josh Boyer 60b78be
Josh Boyer 60b78be
:100644 100644 67fcfdf... 02e3d75... M	net/mac80211/mesh.c
Josh Boyer 60b78be
:100644 100644 aec786d... 1d237e9... M	net/mac80211/mlme.c
Josh Boyer 60b78be
 net/mac80211/mesh.c |    3 ++-
Josh Boyer 60b78be
 net/mac80211/mlme.c |    3 ++-
Josh Boyer 60b78be
 2 files changed, 4 insertions(+), 2 deletions(-)
Josh Boyer 60b78be
Josh Boyer 60b78be
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
Josh Boyer 60b78be
index 67fcfdf..02e3d75 100644
Josh Boyer 60b78be
--- a/net/mac80211/mesh.c
Josh Boyer 60b78be
+++ b/net/mac80211/mesh.c
Josh Boyer 60b78be
@@ -779,7 +779,8 @@ void ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local)
Josh Boyer 60b78be
 
Josh Boyer 60b78be
 	rcu_read_lock();
Josh Boyer 60b78be
 	list_for_each_entry_rcu(sdata, &local->interfaces, list)
Josh Boyer 60b78be
-		if (ieee80211_vif_is_mesh(&sdata->vif))
Josh Boyer 60b78be
+		if (ieee80211_sdata_running(sdata)
Josh Boyer 60b78be
+		    && ieee80211_vif_is_mesh(&sdata->vif))
Josh Boyer 60b78be
 			ieee80211_queue_work(&local->hw, &sdata->work);
Josh Boyer 60b78be
 	rcu_read_unlock();
Josh Boyer 60b78be
 }
Josh Boyer 60b78be
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
Josh Boyer 60b78be
index aec786d..1d237e9 100644
Josh Boyer 60b78be
--- a/net/mac80211/mlme.c
Josh Boyer 60b78be
+++ b/net/mac80211/mlme.c
Josh Boyer 60b78be
@@ -3054,7 +3054,8 @@ void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local)
Josh Boyer 60b78be
 	/* Restart STA timers */
Josh Boyer 60b78be
 	rcu_read_lock();
Josh Boyer 60b78be
 	list_for_each_entry_rcu(sdata, &local->interfaces, list)
Josh Boyer 60b78be
-		ieee80211_restart_sta_timer(sdata);
Josh Boyer 60b78be
+		if (ieee80211_sdata_running(sdata))
Josh Boyer 60b78be
+			ieee80211_restart_sta_timer(sdata);
Josh Boyer 60b78be
 	rcu_read_unlock();
Josh Boyer 60b78be
 }
Josh Boyer 60b78be
 
Josh Boyer 60b78be
-- 
Josh Boyer 60b78be
1.7.3.4
Josh Boyer 60b78be
Josh Boyer 60b78be
--
Josh Boyer 60b78be
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
Josh Boyer 60b78be
the body of a message to majordomo@vger.kernel.org
Josh Boyer 60b78be
More majordomo info at  http://vger.kernel.org/majordomo-info.html