From: Johannes Berg <johannes.berg@intel.com>
Date: Wed, 18 Jul 2012 10:42:58 +0000 (+0200)
Subject: mac80211: fix scan_sdata assignment
X-Git-Tag: Ubuntu-5.10.0-12.13~20866^2~30^2~7
X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=3aa569c3fedbd0d16041d08bf6e89b8c43aee650;p=mirror_ubuntu-hirsute-kernel.git

mac80211: fix scan_sdata assignment

We need to use RCU to assign scan_sdata.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---

diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 169da0742c81..7644181cb6b4 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -304,7 +304,7 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted,
 	if (local->scan_req != local->int_scan_req)
 		cfg80211_scan_done(local->scan_req, aborted);
 	local->scan_req = NULL;
-	local->scan_sdata = NULL;
+	rcu_assign_pointer(local->scan_sdata, NULL);
 
 	local->scanning = 0;
 	local->scan_channel = NULL;