mac80211: fix IBSS teardown race
authorJohannes Berg <johannes.berg@intel.com>
Wed, 8 Jun 2011 11:27:29 +0000 (13:27 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 8 Jun 2011 18:19:05 +0000 (14:19 -0400)
commitf3209bea110cade12e2b133da8b8499689cb0e2e
tree27346021a1b6a50b49a6a27696a1f01f18655f7c
parent43e4e0b94984b45d52048e3ac027cac15c718b65
mac80211: fix IBSS teardown race

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>
Cc: stable@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/ibss.c