Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3415950rdb; Sun, 10 Dec 2023 05:06:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2plRbr+pF6a5Fc4Kuk+kTNJmJ+Oj2lR+7nbsBlCAlFyOvkKdu9DSi+A712lCF9i4jKcSV X-Received: by 2002:a92:ca09:0:b0:35d:5995:79a3 with SMTP id j9-20020a92ca09000000b0035d599579a3mr5777777ils.61.1702213596233; Sun, 10 Dec 2023 05:06:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702213596; cv=none; d=google.com; s=arc-20160816; b=U2ER8z08McqvmKlgY6HY1TVmDs1GuTgr3LC4ciC63Hax5ttE7AjA+tK37oRlcdXQuw UW2NdxRBJ1fWFChd63J7FcSBBvBwWgOfn5b+MkmYoTHfBIC+9mozNAQuyGu+OzoHt3dV h/XwKl0trdftAAYA/aS6Tl/aVJrcLVX3tBtn/LRoxlzz/doK+gCOtfA7bXGYhvYNXJCr 7f3CfEzFAEmwe0kIbw5vDh83fCNN/AmeADB/Hw5HWUG0IsvSWs0I57HYiUa2QXLqykoB WGh7vtcAmegd2iTcIY47KsuHIqILDaKqr8GzVjnRrUNX5JcqYWsJUpGWYbVd5jtI8l0I /JVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:organization:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=Tr/ww++VtlXwst80IhZqiqNHEH90Md9yMsWJ6Hkjs6k=; fh=YrAuaossMrVPiL8QCJPQEDvC/PQo4rrLqZt++logQ2o=; b=nraLMlpuFoGu8kuOu6gE+nnuLeRGHEh3Qhfi641tngKKbp/hp50jPmOIlBs69fUNMG NVjrMUOMjPvVgj0IrSyt1nFjj/nEA1a2/V53sPfhcRhQuum2WRFAoeMl+/tqPYriLRU8 g+ZXa5eChyRVR3Pr6eI1f4rVH2lMBjzb5uPSszH9o7flt+0CfQq9zAMvxEbGOjHKxXy9 MT/9YIi6eEqpidq+8sds1rXqteDlIynMSKjFBYoayr8MQIvx0zGNnzawA4vCOcZ5G/bD 20BKPZnpOn869dwrtG7mXPGAIGMkmcTltehryR4CBAUocURrO8IMqKyckb1SFClQTjWH dDbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@intel.com header.s=Intel header.b=hu6wZOUQ; spf=pass (google.com: domain of linux-wireless+bounces-605-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-605-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id f31-20020a63555f000000b005c1e762bc50si4426507pgm.742.2023.12.10.05.06.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 05:06:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-605-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=fail header.i=@intel.com header.s=Intel header.b=hu6wZOUQ; spf=pass (google.com: domain of linux-wireless+bounces-605-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-605-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A18F4280E5D for ; Sun, 10 Dec 2023 13:06:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0AEF3C8DE; Sun, 10 Dec 2023 13:06:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.b="hu6wZOUQ" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8F3AA6 for ; Sun, 10 Dec 2023 05:06:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702213585; x=1733749585; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sUvLvHSGpTg2W+vBKYZ+WCNKupVSygatMl/3Rwexo9I=; b=hu6wZOUQfe/aJF9rVTjKLbYODQlsptGKls9yNhV4Ij5ZzTkCRxW9rF4N 2oHL9ivbM54WAwVCesGEMh7ly5zss740U0EP9z/W6vgrAwkIfVl5QZLpU bxT2nCCE//7ajpxQEwxagJEtot4EzkTF/kq2Y04vss+od5776c9dHh1kD 3MlI/yR1VKOkn8U5xDzFURUyoxVcplwN/pqseNuu5uV3UXhj8kaeRx+CX MySt03fZvaf+uRB3uYR2vBTr7tWFkF0nI4JCjzCp3jrujh7hFYcy2zibV lWgbXIlBGc4/5eqwwmHKhyhK8wl0QILvNWkTAj9mkm0vTOphtb++NvlCr Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10919"; a="480746104" X-IronPort-AV: E=Sophos;i="6.04,265,1695711600"; d="scan'208";a="480746104" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Dec 2023 05:06:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10919"; a="748926307" X-IronPort-AV: E=Sophos;i="6.04,265,1695711600"; d="scan'208";a="748926307" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Dec 2023 05:06:23 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg , Berg@web.codeaurora.org, Johannes Subject: [PATCH 10/14] wifi: cfg80211: consume both probe response and beacon IEs Date: Mon, 11 Dec 2023 09:05:28 +0200 Message-Id: <20231211085121.07a88656d7df.I0fe9fc599382de0eccf96455617e377d9c231966@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231211070532.2458539-1-miriam.rachel.korenblit@intel.com> References: <20231211070532.2458539-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited Content-Transfer-Encoding: 8bit From: Benjamin Berg When doing a channel switch, cfg80211_update_known_bss may be called with a BSS where both proberesp_ies and beacon_ies is set. If that happens, both need to be consumed. Signed-off-by: Benjamin Berg Reviewed-by: Berg, Johannes Signed-off-by: Miri Korenblit --- net/wireless/scan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 3e3ba0ddb83e..3d260c99c348 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -1749,7 +1749,9 @@ cfg80211_update_known_bss(struct cfg80211_registered_device *rdev, new->pub.proberesp_ies); if (old) kfree_rcu((struct cfg80211_bss_ies *)old, rcu_head); - } else if (rcu_access_pointer(new->pub.beacon_ies)) { + } + + if (rcu_access_pointer(new->pub.beacon_ies)) { const struct cfg80211_bss_ies *old; if (known->pub.hidden_beacon_bss && -- 2.34.1