]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:49:26 +0000 (09:49 +0100)
commit6b1289199fa6b456fbc8c956c5754a088b7109ec
treedf245623883cc13d8f85c469743c67be3d2239ee
parentb2e15dcf3471543ba72df38c2a071a272b6982d5
cfg80211: Acquire wiphy mutex on regulatory work

BugLink: https://bugs.launchpad.net/bugs/1956302
[ Upstream commit e08ebd6d7b90ae81f21425ca39136f5b2272580f ]

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: a05829a7222e ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
net/wireless/reg.c