mac80211: keep lock when calling __ieee80211_scan_completed()
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 6 Oct 2010 09:22:09 +0000 (11:22 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 6 Oct 2010 20:30:42 +0000 (16:30 -0400)
commite229f844d7223b7063bea1e649203ac521a58fe1
tree59067ee607b0ad937fd541e981428b6c8cb1c5ab
parent259b62e35bf44a97983f275de569929a7d2bd5dd
mac80211: keep lock when calling __ieee80211_scan_completed()

We are taking local->mtx inside __ieee80211_scan_completed(), but just
before call to that function we drop the lock. Dropping/taking lock is not
good, because can lead to hard to understand race conditions.

Patch split scan_completed() code into two functions, first must be called
with local->mtx taken and second without it.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/scan.c