Add rcu_read_lock() and rcu_read_unlock() to avoid suspicious rcu_dereference_check warnings in __cfg80211_bss_update error paths. Signed-off-by: Veerendranath Jakkam <quic_vjakkam@xxxxxxxxxxx> --- net/wireless/scan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/wireless/scan.c b/net/wireless/scan.c index d99319d82205..18f860ac14a7 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -2008,12 +2008,14 @@ __cfg80211_bss_update(struct cfg80211_registered_device *rdev, return found; free_ies: + rcu_read_lock(); ies = (void *)rcu_dereference(tmp->pub.beacon_ies); if (ies) kfree_rcu(ies, rcu_head); ies = (void *)rcu_dereference(tmp->pub.proberesp_ies); if (ies) kfree_rcu(ies, rcu_head); + rcu_read_unlock(); return NULL; } -- 2.34.1