From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B87915AE3 for ; Wed, 9 Aug 2023 10:44:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE99AC433C8; Wed, 9 Aug 2023 10:44:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1691577881; bh=bIeuvSK9pQQp9rLnSwGqz0mUjOfxtqsUlBzYFIa4ctU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L6YhoJVpfdHqnlXM5jiE6Ygp2p99nEof2DaPhpyR32gZnHk7p02kO7+O+Xo4KSRj5 SYu7rSro2hGOUDs9/n3eybvyPINvwOT8aK8KCjFCQjTxJ9NV6f+xrBIeTr7qG+WBJb POwPXQihhSAPGDF0kKgeNVphgdgJAFcpE0RywBH0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ilan Peer , Kalle Valo , Sasha Levin Subject: [PATCH 6.4 027/165] wifi: cfg80211: Fix return value in scan logic Date: Wed, 9 Aug 2023 12:39:18 +0200 Message-ID: <20230809103643.703064145@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230809103642.720851262@linuxfoundation.org> References: <20230809103642.720851262@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Ilan Peer [ Upstream commit fd7f08d92fcd7cc3eca0dd6c853f722a4c6176df ] The reporter noticed a warning when running iwlwifi: WARNING: CPU: 8 PID: 659 at mm/page_alloc.c:4453 __alloc_pages+0x329/0x340 As cfg80211_parse_colocated_ap() is not expected to return a negative value return 0 and not a negative value if cfg80211_calc_short_ssid() fails. Fixes: c8cb5b854b40f ("nl80211/cfg80211: support 6 GHz scanning") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217675 Signed-off-by: Ilan Peer Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230723201043.3007430-1-ilan.peer@intel.com Signed-off-by: Sasha Levin --- net/wireless/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 396c63431e1f3..e9a3b0f724f18 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -640,7 +640,7 @@ static int cfg80211_parse_colocated_ap(const struct cfg80211_bss_ies *ies, ret = cfg80211_calc_short_ssid(ies, &ssid_elem, &s_ssid_tmp); if (ret) - return ret; + return 0; /* RNR IE may contain more than one NEIGHBOR_AP_INFO */ while (pos + sizeof(*ap_info) <= end) { -- 2.40.1