]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: Acquire wiphy mutex on regulatory work
authorIlan Peer <ilan.peer@intel.com>
Thu, 2 Dec 2021 13:28:54 +0000 (15:28 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 14 Dec 2021 10:20:11 +0000 (11:20 +0100)
commitfc4daf7733576faf66d451cf3be4f156653023ff
treec88cb7c037fb7d631d044f526412724015433050
parentb1dadd68a6a86f900dac7ee4682492c6b5eb04ed
cfg80211: Acquire wiphy mutex on regulatory work

The function cfg80211_reg_can_beacon_relax() expects wiphy
mutex to be held when it is being called. However, when
reg_leave_invalid_chans() is called the mutex is not held.
Fix it by acquiring the lock before calling the function.

Fixes: 31793ce79203 ("cfg80211: avoid holding the RTNL when calling the driver")
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20211202152831.527686cda037.I40ad9372a47cbad53b4aae7b5a6ccc0dc3fddf8b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/reg.c