Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp509748imw; Wed, 13 Jul 2022 02:50:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vF0AgjcrK2iqLyI2YpMP0nGoi1fqX1adlFTFT2Fs8sjKjqI6KOusoi1m04vxJ9DAxRLEf2 X-Received: by 2002:a17:90b:4a08:b0:1ef:f36b:18e1 with SMTP id kk8-20020a17090b4a0800b001eff36b18e1mr9319575pjb.246.1657705719417; Wed, 13 Jul 2022 02:48:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657705719; cv=none; d=google.com; s=arc-20160816; b=pzRVli9GgO9OrM1VzPAMEs9cKLtSQC+P0wQioUPztgLfQpgmtmUv1rA0atNlOYwWW8 uSdrDfJj19759jds9hynUaAXpDXG3wrTgZioyz9oSnfen7vWiRtsLozpcYcvhBBQ9Wtg jMkbQ1aVwk1EiU5PgFDPPECkU+IPCZy6/C+IMxH19GZ6gioWoCQUIHd4SlrfW2I+WaDG Q18uFJbnP0SHgdFQVKy9AAmpXVa/25OrZlCb7umCY01EnDc4v+eVpjuyaVr4CRJD46z0 dOFDEZxkdpjboFeQrjIg9xHwESO0CfvuDEVlmYY2VUoatrHcezpexLp1lN/qjsR1LNeC ynVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2ktBs/Wn+htEtZJFsSRL5e+GbbwsEbP19iE4iM70VO0=; b=Snj8keypCLJ5mpSijd+QwMGjKsg/TDe4ppaYocXVJA0T3DDspPZs82Vn/s+NCZ8oxw /EDoQNI918j/G8pIynD0MbCf8dpWGBdMOxoJwd3Nkm8H95G1Ww2wGFWWUDhyeLDmbfyl rY0TMTcqLF+FDnM8IJAdZILmT0XcVhs6JzgwFwOGvRG/a2X3JYfbZy0fjY6fHRyh66wW 849CZS6QE0OpvQk8EBXDu77oCbJjy9ONiQafnCAYW+IirZdpukYJt590vmyFtixNUl00 vyLmAU0b0pAkDsyop/pwbkcZ6rUxrI79zR4uOaWWWpFYjGFO4O9aD+63jXwizoVy07DE tCeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=Z2DdMNEt; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l3-20020a17090270c300b0016be70453d8si15318298plt.19.2022.07.13.02.48.32; Wed, 13 Jul 2022 02:48:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=Z2DdMNEt; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235115AbiGMJqr (ORCPT + 65 others); Wed, 13 Jul 2022 05:46:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236256AbiGMJpi (ORCPT ); Wed, 13 Jul 2022 05:45:38 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B066F789E for ; Wed, 13 Jul 2022 02:45:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=2ktBs/Wn+htEtZJFsSRL5e+GbbwsEbP19iE4iM70VO0=; t=1657705528; x=1658915128; b=Z2DdMNEt9U5X/GrXa24YNar2wpL4qLO7fBFptrvTMc4/i6C CUbA/k2rAWQaJVVcqlzvrlWWP0Jt9EWTlzDlvBER5+mAqzRPs4WcVxFziuR9kKkYzha0fuHrBGZ7T Jwwm4oePK+ombuMGvC+yzM/kvgxm8vHSdNgg7GyBh2ZrOTTapej++rmaCC5WMhdEXHM5D09vKgQ3i iudxnLyQH8gil4q3Yj1LDDR7/9H0497VMKyKgVeK5UHAI55NnCR0WeeWFrS7y33ueFd4whPko4gca 0W/0mozuTs3m+erg19rVubK55pQWIwUl0LllwGeXAh7RgGn6EghiCTJxEk+rG2Ug==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1oBYvu-00EgvB-EI; Wed, 13 Jul 2022 11:45:26 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 62/76] wifi: nl80211: set BSS to NULL if IS_ERR() Date: Wed, 13 Jul 2022 11:44:48 +0200 Message-Id: <20220713114426.b5c378d6ddb8.I7462f3a786637ec8ccf5cca040e7e8debe52f4e3@changeid> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220713094502.163926-1-johannes@sipsolutions.net> References: <20220713094502.163926-1-johannes@sipsolutions.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg If the BSS lookup returned an error, set it to NULL so we don't try to free it. Fixes: d648c23024bd ("wifi: nl80211: support MLO in auth/assoc") Signed-off-by: Johannes Berg --- net/wireless/nl80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 35fb2b0517d9..b75398f0d5b4 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -10767,6 +10767,7 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info) &bssid); if (IS_ERR(req.links[link_id].bss)) { err = PTR_ERR(req.links[link_id].bss); + req.links[link_id].bss = NULL; goto free; } -- 2.36.1