All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miri Korenblit <miriam.rachel.korenblit@intel.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org,
	Benjamin Berg <benjamin.berg@intel.com>,
	Johannes Berg <johannes.berg@intel.com>
Subject: [PATCH v2 08/13] wifi: cfg80211: free beacon_ies when overridden from hidden BSS
Date: Wed, 20 Dec 2023 13:41:41 +0200	[thread overview]
Message-ID: <20231220133549.b898e22dadff.Id8c4c10aedd176ef2e18a4cad747b299f150f9df@changeid> (raw)
In-Reply-To: <20231220133549.bdfb8a9c7c54.I973563562969a27fea8ec5685b96a3a47afe142f@changeid>

From: Benjamin Berg <benjamin.berg@intel.com>

This is a more of a cosmetic fix. The branch will only be taken if
proberesp_ies is set, which implies that beacon_ies is not set unless we
are connected to an AP that just did a channel switch. And, in that case
we should have found the BSS in the internal storage to begin with.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
---
v2: Fix wrong email addresses
---
 net/wireless/scan.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index a601f1c7f835..68ba446067ac 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -1871,8 +1871,12 @@ __cfg80211_bss_update(struct cfg80211_registered_device *rdev,
 				list_add(&new->hidden_list,
 					 &hidden->hidden_list);
 				hidden->refcount++;
+
+				ies = (void *)rcu_dereference(new->pub.beacon_ies);
 				rcu_assign_pointer(new->pub.beacon_ies,
 						   hidden->pub.beacon_ies);
+				if (ies)
+					kfree_rcu(ies, rcu_head);
 			}
 		} else {
 			/*
-- 
2.34.1


  parent reply	other threads:[~2023-12-19 17:41 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-20 11:41 [PATCH v2 01/13] wifi: cfg80211: reg: Support P2P operation on DFS channels Miri Korenblit
2023-12-19 22:03 ` Jeff Johnson
2023-12-19 22:05   ` Johannes Berg
2023-12-20 11:41 ` [PATCH v2 02/13] wifi: cfg80211: Schedule regulatory check on BSS STA channel change Miri Korenblit
2023-12-20 11:41 ` [PATCH v2 03/13] wifi: mac80211: Schedule regulatory channels check on bandwith change Miri Korenblit
2023-12-20 11:41 ` [PATCH v2 04/13] wifi: mac80211_hwsim: Add custom reg for DFS concurrent Miri Korenblit
2023-12-20 11:41 ` [PATCH v2 05/13] wifi: cfg80211: handle UHB AP and STA power type Miri Korenblit
2023-12-22 11:01   ` Kalle Valo
2023-12-23 19:52     ` Korenblit, Miriam Rachel
2023-12-29 13:51       ` Sisodiya, Mukesh
2024-01-02  0:15         ` Arend van Spriel
2024-01-02 21:13           ` Jeff Johnson
2024-01-08 13:36             ` Kalle Valo
2023-12-20 11:41 ` [PATCH v2 06/13] wifi: mac80211: rework RX timestamp flags Miri Korenblit
2023-12-19 22:41   ` Jeff Johnson
2023-12-19 22:43     ` Johannes Berg
2023-12-19 23:16       ` Jeff Johnson
2023-12-21 19:13         ` Johannes Berg
2023-12-20 11:41 ` [PATCH v2 07/13] wifi: mac80211: allow 64-bit radiotap timestamps Miri Korenblit
2023-12-20 11:41 ` Miri Korenblit [this message]
2023-12-20 11:41 ` [PATCH v2 09/13] wifi: cfg80211: ensure cfg80211_bss_update frees IEs on error Miri Korenblit
2023-12-20 11:41 ` [PATCH v2 10/13] wifi: cfg80211: avoid double free if updating BSS fails Miri Korenblit
2023-12-20 11:41 ` [PATCH v2 11/13] wifi: mac80211: fix advertised TTLM scheduling Miri Korenblit
2024-02-29 21:41   ` Ben Greear
2024-02-29 22:47     ` Johannes Berg
2024-02-29 22:53       ` Ben Greear
2023-12-20 11:41 ` [PATCH v2 12/13] wifi: mac80211: add a driver callback to check active_links Miri Korenblit
2023-12-20 11:41 ` [PATCH v2 13/13] wifi: mac80211_hwsim: support HE 40MHz in 2.4Ghz band Miri Korenblit
2023-12-19 22:48   ` Jeff Johnson
2023-12-20 14:13 ` [PATCH v2 01/13] wifi: cfg80211: reg: Support P2P operation on DFS channels Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231220133549.b898e22dadff.Id8c4c10aedd176ef2e18a4cad747b299f150f9df@changeid \
    --to=miriam.rachel.korenblit@intel.com \
    --cc=benjamin.berg@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.