]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mac80211: use del_timer_sync for final sta cleanup timer deletion
authorJohannes Berg <johannes.berg@intel.com>
Thu, 13 Dec 2012 22:08:52 +0000 (23:08 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 6 Feb 2013 04:33:19 +0000 (04:33 +0000)
commit a56f992cdabc63f56b4b142885deebebf936ff76 upstream.

This is a very old bug, but there's nothing that prevents the
timer from running while the module is being removed when we
only do del_timer() instead of del_timer_sync().

The timer should normally not be running at this point, but
it's not clearly impossible (or we could just remove this.)

Tested-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/mac80211/sta_info.c

index 1c775f015daaf6c5bbea9350c784f0110533b7bd..488600c167c989137698fb1062ee8a67f169771c 100644 (file)
@@ -1021,7 +1021,7 @@ void sta_info_init(struct ieee80211_local *local)
 
 void sta_info_stop(struct ieee80211_local *local)
 {
-       del_timer(&local->sta_cleanup);
+       del_timer_sync(&local->sta_cleanup);
        sta_info_flush(local, NULL);
 }