summaryrefslogtreecommitdiff
path: root/net/wireless/scan.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-28 20:43:58 +0300
committerJakub Kicinski <kuba@kernel.org>2021-10-28 20:43:58 +0300
commit7df621a3eea6761bc83e641aaca6963210c7290d (patch)
tree65ab9d0d1894153ceefcb6b5a1c25b8d17c466fd /net/wireless/scan.c
parentf2edaa4ad5d51371709196f2c258fbe875962dee (diff)
parent411a44c24a561e449b592ff631b7ae321f1eb559 (diff)
downloadlinux-7df621a3eea6761bc83e641aaca6963210c7290d.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
include/net/sock.h 7b50ecfcc6cd ("net: Rename ->stream_memory_read to ->sock_is_readable") 4c1e34c0dbff ("vsock: Enable y2038 safe timeval for timeout") drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c 0daa55d033b0 ("octeontx2-af: cn10k: debugfs for dumping LMTST map table") e77bcdd1f639 ("octeontx2-af: Display all enabled PF VF rsrc_alloc entries.") Adjacent code addition in both cases, keep both. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/wireless/scan.c')
-rw-r--r--net/wireless/scan.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index e4f79b23f7f6..22e92be61938 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -418,14 +418,17 @@ cfg80211_add_nontrans_list(struct cfg80211_bss *trans_bss,
}
ssid_len = ssid[1];
ssid = ssid + 2;
- rcu_read_unlock();
/* check if nontrans_bss is in the list */
list_for_each_entry(bss, &trans_bss->nontrans_list, nontrans_list) {
- if (is_bss(bss, nontrans_bss->bssid, ssid, ssid_len))
+ if (is_bss(bss, nontrans_bss->bssid, ssid, ssid_len)) {
+ rcu_read_unlock();
return 0;
+ }
}
+ rcu_read_unlock();
+
/* add to the list */
list_add_tail(&nontrans_bss->nontrans_list, &trans_bss->nontrans_list);
return 0;