mac80211: don't stop a single aggregation session twice
authorJohannes Berg <johannes.berg@intel.com>
Thu, 24 Nov 2011 19:06:14 +0000 (20:06 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Dec 2011 16:52:33 +0000 (08:52 -0800)
commit64a1b241dd84ed6b12b62bbb67b380609bdd50b2
tree0d06d32d315910d8972fa159248d03068efcc605
parent6cb4e0db2f318c0730f31622fc5812a19e7ff379
mac80211: don't stop a single aggregation session twice

commit 24f50a9d165745fd0701c6e089d35f58a229ea69 upstream.

Nikolay noticed (by code review) that mac80211 can
attempt to stop an aggregation session while it is
already being stopped. So to fix it, check whether
stop is already being done and bail out if so.

Also move setting the STOPPING state into the lock
so things are properly atomic.

Reported-by: Nikolay Martynov <mar.kolya@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/mac80211/agg-tx.c