]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cfg80211: fix race on init and driver registration
authorLuis R. Rodriguez <mcgrof@qca.qualcomm.com>
Mon, 28 Nov 2011 21:47:15 +0000 (16:47 -0500)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Fri, 16 Dec 2011 01:38:13 +0000 (17:38 -0800)
commitda92f48c2fc85284d14d85752ee8f45d4339d165
treef699b6e78bb0e07fd72420f5b17f11d28cb20895
parentbc949613e7c3ae42c4087d957de77e0fe31c423a
cfg80211: fix race on init and driver registration

commit a042994dd377d86bff9446ee76151ceb6267c9ba upstream.

There is a theoretical race that if hit will trigger
a crash. The race is between when we issue the first
regulatory hint, regulatory_hint_core(), gets processed
by the workqueue and between when the first device
gets registered to the wireless core. This is not easy
to reproduce but it was easy to do so through the
regulatory simulator I have been working on. This
is a port of the fix I implemented there [1].

[1] https://github.com/mcgrof/regsim/commit/a246ccf81f059cb662eee288aa13100f631e4cc8

Cc: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/wireless/reg.c