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:54:28 +0000 (08:54 -0800)
commit743646bb5669b390e18a7d1f45ab5db8db48e09d
treeda8f9140007fde557f897a2d1d21d072996b51e3
parent737df45ddfbd5f96a9b38a16d5eef9eb7cd3a9a0
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