mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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: [email protected] Signed-off-by: Luis R. Rodriguez <[email protected]> Tested-by: Alan Jenkins <[email protected]> Signed-off-by: John W. Linville <[email protected]>
This commit is contained in:
parent
267d493b32
commit
5078b2e32a
1 changed files with 7 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue