mac80211: fix IBSS teardown race
commit007b2687279cc06356884433ee630c1663d8378b
authorJohannes Berg <johannes.berg@intel.com>
Wed, 8 Jun 2011 11:27:29 +0000 (8 13:27 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 23 Jun 2011 22:05:40 +0000 (23 15:05 -0700)
tree0f7aac9a0602f1020ed84a770554a55974e26889
parent50224eeecc2357b6287ed2dc81963b61d89f824d
mac80211: fix IBSS teardown race

commit f3209bea110cade12e2b133da8b8499689cb0e2e upstream.

Ignacy reports that sometimes after leaving an IBSS
joining a new one didn't work because there still
were stations on the list. He fixed it by flushing
stations when attempting to join a new IBSS, but
this shouldn't be happening in the first case. When
I looked into it I saw a race condition in teardown
that could cause stations to be added after flush,
and thus cause this situation. Ignacy confirms that
after applying my patch he hasn't seen this happen
again.

Reported-by: Ignacy Gawedzki <i@lri.fr>
Debugged-by: Ignacy Gawedzki <i@lri.fr>
Tested-by: Ignacy Gawedzki <i@lri.fr>
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/ibss.c