cfg80211: fix race in giwrate
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 7 Jul 2009 21:41:27 +0000 (23:41 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 24 Jul 2009 19:05:06 +0000 (15:05 -0400)
commita71d62dbf3f0523b7a456333196cb26cf783fe92
tree5464eb108c6e9a2849cb81c81473713ce8c84d12
parente0f114e82e3781087a0ad0e92c94ff0d55012c1a
cfg80211: fix race in giwrate

cfg80211_wext_giwrate doesn't lock the wdev, so it
cannot access current_bss race-free. Also, there's
little point in trying to ask the driver for an AP
that it never told us about, so avoid that case.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/wext-compat.c