aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-12-05 03:49:14 -0500
committerJohannes Berg <johannes.berg@intel.com>2012-12-06 08:05:05 -0500
commit0b7dff4faed07f55be2a98dd0eafc02623174236 (patch)
tree632417e2b6302076b3ef5781a5da98506cbff097 /net/mac80211/iface.c
parent01331040e6442ad09181bfaacd8bb9687dce2389 (diff)
mac80211: cancel work instead of waiting for it to do nothing
If the sdata work is pending while the interface is stopped, we currently flush it. If it's not running this means waiting for it to run, which could take a while if the workqueue is backlogged. However, the work exits right away if it starts to run while the interface is already stopping. There's no point in waiting for that, so use cancel_work_sync() instead. Reported-by: Ben Greear <greearb@candelatech.com> Tested-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 40c36d5d7377..09a80b55cf5a 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -862,7 +862,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
862 rcu_assign_pointer(local->p2p_sdata, NULL); 862 rcu_assign_pointer(local->p2p_sdata, NULL);
863 /* fall through */ 863 /* fall through */
864 default: 864 default:
865 flush_work(&sdata->work); 865 cancel_work_sync(&sdata->work);
866 /* 866 /*
867 * When we get here, the interface is marked down. 867 * When we get here, the interface is marked down.
868 * Call rcu_barrier() to wait both for the RX path 868 * Call rcu_barrier() to wait both for the RX path