diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-05-13 23:04:42 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-20 20:29:54 +0200 |
commit | 5078b2e32ad4b1f753b1c837c15892202f753c97 (patch) | |
tree | e4d2f9a3ff9d4ec605980700af92b682421908f7 /net/wireless | |
parent | airo: fix airo_get_encode{,ext} buffer overflow like I mean it... (diff) | |
download | linux-5078b2e32ad4b1f753b1c837c15892202f753c97.tar.xz linux-5078b2e32ad4b1f753b1c837c15892202f753c97.zip |
cfg80211: fix race between core hint and driver's custom apply
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.
Cc: stable@kernel.org
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>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/reg.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 08265ca15785..487cb627ddba 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1551,6 +1551,13 @@ static int regulatory_hint_core(const char *alpha2) queue_regulatory_request(request); + /* + * This ensures last_request is populated once modules + * come swinging in and calling regulatory hints and + * wiphy_apply_custom_regulatory(). + */ + flush_scheduled_work(); + return 0; } |