Message ID | 20240904142021.3887360-1-quic_vjakkam@quicinc.com |
---|---|
State | New |
Headers | show |
Series | [v2] wifi: cfg80211: Avoid RCU debug splat in __cfg80211_bss_update error paths | expand |
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index d99319d82205..e9bba230434a 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);
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 <quic_vjakkam@quicinc.com> --- v2: * Replace rcu_dereference() with rcu_access_pointer() instead of holding RCU read lock. --- net/wireless/scan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)