Search Linux Wireless

[PATCH] wifi: cfg80211: Avoid RCU debug splat in __cfg80211_bss_update error paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux