Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1772256rdh; Tue, 26 Sep 2023 03:11:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGsueCdsHwZFyeBQwwNCUU8M23sMExG+1mDG6k0SyQk1y2l2GI5vZof96Grg6vYC0P5jJbJ X-Received: by 2002:a17:90a:6486:b0:274:1bc9:b72 with SMTP id h6-20020a17090a648600b002741bc90b72mr8077457pjj.24.1695723064863; Tue, 26 Sep 2023 03:11:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695723064; cv=none; d=google.com; s=arc-20160816; b=R9wSuSJP48TlGWNlzRHt5gMuYaCguU/eyiW71fFYsFZKNVTzggZyXB3ne3AW1wAvns ZPLQWzoYty2NbwwXdaN39jyRy8lj8SFiRlqeTbgyasJn39qFhWvedCvBYyHDSrBiRFBV kfALZCAWXEqb7Or7NsUGrkRdRhNbUnZP2zAf0X3itM0P+eZOrPWsEYNU2/vmwdefQUSW KCY9Ptq5q2ilTTzKNWTGsLXm+llolH4G3auzyx7wIdLeUw9kXcaNm0FsJ/s+H8We1EPg r19bnANwfumgzN6Js7eqeoyKSSKcmTXva5VEIC3bAGQWMFS94HiwBUVxBKGX5ji4sSlJ K16w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=lHFDEW0kq8NtsAXpBZ++Cp7iz9lotlz7DmLLsh5/l20=; fh=YSlvpPL42+OV5bLFCL+NbyjIvOHCcshrxbzBHge5Zrw=; b=QDRizWDSQe8VXo7APTdttYn2mRBoGZpeO1Id6xYfR5j5Xzd4i43vnWkeUwfp7I2njG GcTgFklu5M2RlZbveMpotTchnzqu7r3SLr9izI85WTAGx+BehsUTyTfZPcj8Kf3mpNyM 8n1JLevCEZgkPOr/3IwsrgNkkoJ7auRt7wgHZNJjdGuJckPLOJxIrwK6qXMwFPf2tW1x EVww6D4GSuhb5y+v91l4fGE8jIaN/iWtoze4nK5O3DMKZo35Zfai671bp/v3fW5aBCR/ ErBYzR3bJEFT87LDA0W4J/LXgFmvP8sykoCm28r/58oc2rCn9IS/vp04nG0z+cL4/0l8 zODA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=M69x6LKc; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id b13-20020a17090aa58d00b00274caaa057asi13997603pjq.42.2023.09.26.03.11.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 03:11:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=M69x6LKc; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id C642D8049093; Mon, 25 Sep 2023 19:41:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233356AbjIZClV (ORCPT + 56 others); Mon, 25 Sep 2023 22:41:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbjIZClU (ORCPT ); Mon, 25 Sep 2023 22:41:20 -0400 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCB5610A; Mon, 25 Sep 2023 19:41:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1695696072; bh=lHFDEW0kq8NtsAXpBZ++Cp7iz9lotlz7DmLLsh5/l20=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=M69x6LKc4uJ4uFRycLqidqnGAxfhWCADft1UAL+Qzr79X5I4vs5X4gqDWcHl42JlU 6KW+ZHYRqfc+ZGchPVGzhX02kbW+wCsCaGLLj2bqLSFRrUF32LTBQTKD9vsPolPRh6 XouktsWpvCV+qMQPTamUzCGpBzqrvktrX4X/sP43kcO13w0ohjNwFc116RB7YTIpwl bWPCOqO9taeBlpmJ0Gx4rIPOl5uEXeBSR2bcfAzQMjrtg0QJXSrdbUFNaR7IhQ2tGb k4MVlcNa0Ym4JYD1oZbalJCaXgu+brGm8DAno3VymqMy3t+AmQEfLbPMZu3AlHPwWa izGJax7MBdRQg== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4RvkWq63BNz4xP9; Tue, 26 Sep 2023 12:41:11 +1000 (AEST) Date: Tue, 26 Sep 2023 12:41:11 +1000 From: Stephen Rothwell To: Kalle Valo , Johannes Berg , Wireless Cc: Johannes Berg , Linux Kernel Mailing List , Linux Next Mailing List Subject: Re: linux-next: manual merge of the wireless-next tree with the wireless tree Message-ID: <20230926124111.29103070@canb.auug.org.au> In-Reply-To: <20230926120253.4f1e5730@canb.auug.org.au> References: <20230926120253.4f1e5730@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/ZKHl_fTBWpCZtF5YDNHFwqc"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 25 Sep 2023 19:41:18 -0700 (PDT) --Sig_/ZKHl_fTBWpCZtF5YDNHFwqc Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi all, On Tue, 26 Sep 2023 12:02:53 +1000 Stephen Rothwell = wrote: >=20 > Today's linux-next merge of the wireless-next tree got conflicts in: >=20 > net/mac80211/cfg.c >=20 > between commit: >=20 > 31db78a4923e ("wifi: mac80211: fix potential key use-after-free") >=20 > from the wireless tree and commit: >=20 > 4d3acf4311a0 ("wifi: mac80211: remove sta_mtx") >=20 > from the wireless-next tree. >=20 > I fixed it up (see below) and can carry the fix as necessary. This > is now fixed as far as linux-next is concerned, but any non trivial > conflicts should be mentioned to your upstream maintainer when your tree > is submitted for merging. You may also want to consider cooperating > with the maintainer of the conflicting tree to minimise any particularly > complex conflicts. That wasn't quite right. The final resolution is below. --=20 Cheers, Stephen Rothwell diff --cc net/mac80211/cfg.c index 0e3a1753a51c,5bc6b1329465..3e7bb883137c --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@@ -472,8 -470,9 +470,10 @@@ static int ieee80211_add_key(struct wip struct ieee80211_local *local =3D sdata->local; struct sta_info *sta =3D NULL; struct ieee80211_key *key; + int err; =20 + lockdep_assert_wiphy(local->hw.wiphy); +=20 if (!ieee80211_sdata_running(sdata)) return -ENETDOWN; =20 @@@ -565,15 -561,7 +562,11 @@@ break; } =20 - return ieee80211_key_link(key, link, sta); + err =3D ieee80211_key_link(key, link, sta); + /* KRACK protection, shouldn't happen but just silently accept key */ + if (err =3D=3D -EALREADY) + err =3D 0; -=20 - out_unlock: - mutex_unlock(&local->sta_mtx); -=20 + return err; } =20 static struct ieee80211_key * --Sig_/ZKHl_fTBWpCZtF5YDNHFwqc Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAmUSRMcACgkQAVBC80lX 0GwEggf/TpfEL0JAdGjvNEPw9ytkOvN59ikvJc+qHM/Z1gVYUr+DRYqCq5xew2de JhVLx+++FPoX8mg5rtEfwBLVst6E7BaWWTTE7dXHXT0ZYihTfc7efZ9kzs9zWuco I54+9WUG0l7qdbmAhQAO50qDyKpy0FD2ONLNbbB1DbiFZJoJWtvyQ4jEO8yK2V1I EruqpiwoAip+sjMIG73NrZkD5kcD4NkpoFVRojYrhnZzMwV8u9vYfumHm37SsHCT Y8AzrrHCwMRIgSwg6GoPUYHo2QVERQtqlwiXZeIhogp6YiyKoPvCCe4CBFiF6Mzk /cSwnFj3FrE+pLSAzxlsLqIlvjA2ZA== =uduE -----END PGP SIGNATURE----- --Sig_/ZKHl_fTBWpCZtF5YDNHFwqc--