cfg80211: fix race between core hint and driver's custom apply
commitc1cc5093ab054f5d2c4942d3f5b0bf7b106ce975
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 13 May 2009 21:04:42 +0000 (13 17:04 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Jun 2009 16:40:02 +0000 (15 09:40 -0700)
tree97301b194814b2dba29e94a33d7987cb29d547a0
parentfb6af04fa4363ec3cf4020e28a45dcbe9853620b
cfg80211: fix race between core hint and driver's custom apply

commit 5078b2e32ad4b1f753b1c837c15892202f753c97 upstream.

Its possible for cfg80211 to have scheduled the work and for
the global workqueue to not have kicked in prior to a cfg80211
driver's regulatory hint or wiphy_apply_custom_regulatory().

Although this is very unlikely its possible and should fix
this race. When this race would happen you are expected to have
hit a null pointer dereference panic.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/wireless/reg.c