diff options
| author | Veerendranath Jakkam <[email protected]> | 2024-09-04 14:20:21 +0000 |
|---|---|---|
| committer | Johannes Berg <[email protected]> | 2024-09-06 10:55:43 +0000 |
| commit | f54a1baee098170b13b624ca5ed2afdb4d29edbc (patch) | |
| tree | eb229853b14b24bd5af394c922a4697397aa0d49 | |
| parent | wifi: cfg80211: fix UBSAN noise in cfg80211_wext_siwscan() (diff) | |
| download | kernel-f54a1baee098170b13b624ca5ed2afdb4d29edbc.tar.gz kernel-f54a1baee098170b13b624ca5ed2afdb4d29edbc.zip | |
wifi: cfg80211: Avoid RCU debug splat in __cfg80211_bss_update error paths
Replace rcu_dereference() with rcu_access_pointer() since we already
hold the lock and own the 'tmp' at this point. This is needed to avoid
suspicious rcu_dereference_check warnings in__cfg80211_bss_update error
paths.
Signed-off-by: Veerendranath Jakkam <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
| -rw-r--r-- | net/wireless/scan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 3ff818849d83..1ef6448bc636 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -2008,10 +2008,10 @@ __cfg80211_bss_update(struct cfg80211_registered_device *rdev, return found; free_ies: - ies = (void *)rcu_dereference(tmp->pub.beacon_ies); + ies = (void *)rcu_access_pointer(tmp->pub.beacon_ies); if (ies) kfree_rcu(ies, rcu_head); - ies = (void *)rcu_dereference(tmp->pub.proberesp_ies); + ies = (void *)rcu_access_pointer(tmp->pub.proberesp_ies); if (ies) kfree_rcu(ies, rcu_head); |
