diff options
author | Johannes Berg <johannes.berg@intel.com> | 2022-10-13 19:41:51 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-11-16 09:58:14 +0100 |
commit | 2c6ba0a7872be3636d0623a19aba106ecb405737 (patch) | |
tree | 791d887e8bbfce0b21d096e49003237531261dfc /net/wireless | |
parent | 921738c280abca9a7312f0ee81086f7b03dcfab5 (diff) | |
download | linux-stable-2c6ba0a7872be3636d0623a19aba106ecb405737.tar.gz linux-stable-2c6ba0a7872be3636d0623a19aba106ecb405737.tar.bz2 linux-stable-2c6ba0a7872be3636d0623a19aba106ecb405737.zip |
wifi: cfg80211: silence a sparse RCU warning
[ Upstream commit 03c0ad4b06c3566de624b4f4b78ac1a5d1e4c8e7 ]
All we're going to do with this pointer is assign it to
another __rcu pointer, but sparse can't see that, so
use rcu_access_pointer() to silence the warning here.
Fixes: c90b93b5b782 ("wifi: cfg80211: update hidden BSSes to avoid WARN_ON")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/scan.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index f0de22a6caf7..2477d28c2dab 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -1676,7 +1676,9 @@ cfg80211_update_known_bss(struct cfg80211_registered_device *rdev, if (old == rcu_access_pointer(known->pub.ies)) rcu_assign_pointer(known->pub.ies, new->pub.beacon_ies); - cfg80211_update_hidden_bsses(known, new->pub.beacon_ies, old); + cfg80211_update_hidden_bsses(known, + rcu_access_pointer(new->pub.beacon_ies), + old); if (old) kfree_rcu((struct cfg80211_bss_ies *)old, rcu_head); |