]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: hold bss_lock while updating nontrans_list
authorRameshkumar Sundaram <quic_ramess@quicinc.com>
Mon, 11 Apr 2022 09:07:51 +0000 (14:37 +0530)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 11 Apr 2022 09:55:36 +0000 (11:55 +0200)
commiteb040fcdcf57553bbd485eeb3e1608dcf2931d22
tree4b34baeeab52e73a8d54370be8c091d6a6aee703
parent657ca3d9d5ff684858f934b63eaf9dabb5164e63
cfg80211: hold bss_lock while updating nontrans_list

Synchronize additions to nontrans_list of transmitting BSS with
bss_lock to avoid races. Also when cfg80211_add_nontrans_list() fails
__cfg80211_unlink_bss() needs bss_lock to be held (has lockdep assert
on bss_lock). So protect the whole block with bss_lock to avoid
races and warnings. Found during code review.

Fixes: ac2a324087a0 ("cfg80211: Parsing of Multiple BSSID information in scanning")
Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
Link: https://lore.kernel.org/r/1649668071-9370-1-git-send-email-quic_ramess@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/scan.c