From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74106C4332F for ; Thu, 17 Mar 2022 12:54:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234315AbiCQMz5 (ORCPT ); Thu, 17 Mar 2022 08:55:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234303AbiCQMxD (ORCPT ); Thu, 17 Mar 2022 08:53:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 636CD1FAA16; Thu, 17 Mar 2022 05:50:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 37563614F0; Thu, 17 Mar 2022 12:50:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47EF9C340E9; Thu, 17 Mar 2022 12:50:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521447; bh=wmCh4MRMcjf729jX9PRCsafTDB+T+FBR5jtLw0d/9nw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f238VfYTcrxBWBU1dE9LmJ+XrRuxoYczAICbbiwNDOoYyz3UW4kmRflrbHZuunbOG u6ovwrpLUT/+9FT9fCvsDy1guxLkCN4N74ogAdeKOGj/dwOJQ48geDktvCqUeoqmpb OQSqXg1i3p/31GAmcLavZ55W3LV6xOC3jL284mEM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kai Lueke , Steffen Klassert Subject: [PATCH 5.15 01/25] Revert "xfrm: state and policy should fail if XFRMA_IF_ID 0" Date: Thu, 17 Mar 2022 13:45:48 +0100 Message-Id: <20220317124526.352308525@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Kai Lueke commit a3d9001b4e287fc043e5539d03d71a32ab114bcb upstream. This reverts commit 68ac0f3810e76a853b5f7b90601a05c3048b8b54 because ID 0 was meant to be used for configuring the policy/state without matching for a specific interface (e.g., Cilium is affected, see https://github.com/cilium/cilium/pull/18789 and https://github.com/cilium/cilium/pull/19019). Signed-off-by: Kai Lueke Signed-off-by: Steffen Klassert Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- net/xfrm/xfrm_user.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -629,13 +629,8 @@ static struct xfrm_state *xfrm_state_con =20 xfrm_smark_init(attrs, &x->props.smark); =20 - if (attrs[XFRMA_IF_ID]) { + if (attrs[XFRMA_IF_ID]) x->if_id =3D nla_get_u32(attrs[XFRMA_IF_ID]); - if (!x->if_id) { - err =3D -EINVAL; - goto error; - } - } =20 err =3D __xfrm_init_state(x, false, attrs[XFRMA_OFFLOAD_DEV]); if (err) @@ -1431,13 +1426,8 @@ static int xfrm_alloc_userspi(struct sk_ =20 mark =3D xfrm_mark_get(attrs, &m); =20 - if (attrs[XFRMA_IF_ID]) { + if (attrs[XFRMA_IF_ID]) if_id =3D nla_get_u32(attrs[XFRMA_IF_ID]); - if (!if_id) { - err =3D -EINVAL; - goto out_noput; - } - } =20 if (p->info.seq) { x =3D xfrm_find_acq_byseq(net, mark, p->info.seq); @@ -1750,13 +1740,8 @@ static struct xfrm_policy *xfrm_policy_c =20 xfrm_mark_get(attrs, &xp->mark); =20 - if (attrs[XFRMA_IF_ID]) { + if (attrs[XFRMA_IF_ID]) xp->if_id =3D nla_get_u32(attrs[XFRMA_IF_ID]); - if (!xp->if_id) { - err =3D -EINVAL; - goto error; - } - } =20 return xp; error: From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4BF0AC4321E for ; Thu, 17 Mar 2022 12:58:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235494AbiCQM7G (ORCPT ); Thu, 17 Mar 2022 08:59:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234716AbiCQMx0 (ORCPT ); Thu, 17 Mar 2022 08:53:26 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E6D61FE576; Thu, 17 Mar 2022 05:51:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id D8764CE2340; Thu, 17 Mar 2022 12:51:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4EF5FC340E9; Thu, 17 Mar 2022 12:51:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521490; bh=WB/A9z0bllwl5fTK4cuQmxEQkRdoAy5zWdRVr5axPS4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QYMz/MKoQTn5tcwxqb+XPeH98ouBYNf/U1N3P5J0b5nNdHIim36cS9njmZQW0qow5 U9Xb7o6Por4RTSxvEBT/k6HOgoSurob+D/kPACc04tImvZSLub0pV3GJxnydNt4JQA rR7cHQY9zvHOyrskV5l8+7mroRNtVbGbDMfedGn4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Quentin Schulz , Quentin Schulz , Heiko Stuebner , Sasha Levin Subject: [PATCH 5.15 02/25] arm64: dts: rockchip: fix rk3399-puma-haikou USB OTG mode Date: Thu, 17 Mar 2022 13:45:49 +0100 Message-Id: <20220317124526.381270640@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Quentin Schulz [ Upstream commit ed2c66a95c0c5669880aa93d0d34c6e9694b4cbd ] The micro USB3.0 port available on the Haikou evaluation kit for Puma RK3399-Q7 SoM supports dual-role model (aka drd or OTG) but its support was broken until now because of missing logic around the ID pin. This adds proper support for USB OTG on Puma Haikou by "connecting" the GPIO used for USB ID to the USB3 controller device. Cc: Quentin Schulz Signed-off-by: Quentin Schulz Link: https://lore.kernel.org/r/20220120125156.16217-1-quentin.schulz@theob= roma-systems.com Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- .../arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 1 + arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts b/arch/arm= 64/boot/dts/rockchip/rk3399-puma-haikou.dts index 292bb7e80cf3..3ae5d727e367 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts @@ -232,6 +232,7 @@ =20 &usbdrd_dwc3_0 { dr_mode =3D "otg"; + extcon =3D <&extcon_usb3>; status =3D "okay"; }; =20 diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boo= t/dts/rockchip/rk3399-puma.dtsi index fb67db4619ea..002ece51c3ba 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi @@ -25,6 +25,13 @@ }; }; =20 + extcon_usb3: extcon-usb3 { + compatible =3D "linux,extcon-usb-gpio"; + id-gpio =3D <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&usb3_id>; + }; + clkin_gmac: external-gmac-clock { compatible =3D "fixed-clock"; clock-frequency =3D <125000000>; @@ -422,6 +429,13 @@ <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; }; }; + + usb3 { + usb3_id: usb3-id { + rockchip,pins =3D + <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; =20 &sdhci { --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 908EBC433EF for ; Thu, 17 Mar 2022 12:55:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234414AbiCQM5K (ORCPT ); Thu, 17 Mar 2022 08:57:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234840AbiCQMx5 (ORCPT ); Thu, 17 Mar 2022 08:53:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 069EA1EE8E1; Thu, 17 Mar 2022 05:51:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 82AF3614F4; Thu, 17 Mar 2022 12:51:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44948C340E9; Thu, 17 Mar 2022 12:51:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521509; bh=WJrhvO2/qwG9jEBe/N7W1O7X3KvtG0ncaoDUDefxucE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cVIGi6BDxQl25IHNI0MiMz26CtXUakwynkaxEGBXzKuDZfkkBX4rY4fFw2ZRq/WY2 kVsnYL1hb680iOunTgxC5+Locoe0zjrvUGAKYNO15Yf8WjMqKnE9eEC6fJpIFerGCY lGlUxkPxPz9pFnN9Aw9MGOX5jCJthY7FZ62boh20= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yan Yan , Steffen Klassert , Sasha Levin Subject: [PATCH 5.15 03/25] xfrm: Check if_id in xfrm_migrate Date: Thu, 17 Mar 2022 13:45:50 +0100 Message-Id: <20220317124526.408113523@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Yan Yan [ Upstream commit c1aca3080e382886e2e58e809787441984a2f89b ] This patch enables distinguishing SAs and SPs based on if_id during the xfrm_migrate flow. This ensures support for xfrm interfaces throughout the SA/SP lifecycle. When there are multiple existing SPs with the same direction, the same xfrm_selector and different endpoint addresses, xfrm_migrate might fail with ENODATA. Specifically, the code path for performing xfrm_migrate is: Stage 1: find policy to migrate with xfrm_migrate_policy_find(sel, dir, type, net) Stage 2: find and update state(s) with xfrm_migrate_state_find(mp, net) Stage 3: update endpoint address(es) of template(s) with xfrm_policy_migrate(pol, m, num_migrate) Currently "Stage 1" always returns the first xfrm_policy that matches, and "Stage 3" looks for the xfrm_tmpl that matches the old endpoint address. Thus if there are multiple xfrm_policy with same selector, direction, type and net, "Stage 1" might rertun a wrong xfrm_policy and "Stage 3" will fail with ENODATA because it cannot find a xfrm_tmpl with the matching endpoint address. The fix is to allow userspace to pass an if_id and add if_id to the matching rule in Stage 1 and Stage 2 since if_id is a unique ID for xfrm_policy and xfrm_state. For compatibility, if_id will only be checked if the attribute is set. Tested with additions to Android's kernel unit test suite: https://android-review.googlesource.com/c/kernel/tests/+/1668886 Signed-off-by: Yan Yan Signed-off-by: Steffen Klassert Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- include/net/xfrm.h | 5 +++-- net/key/af_key.c | 2 +- net/xfrm/xfrm_policy.c | 14 ++++++++------ net/xfrm/xfrm_state.c | 7 ++++++- net/xfrm/xfrm_user.c | 6 +++++- 5 files changed, 23 insertions(+), 11 deletions(-) diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 301a164f17e9..358dfe6fefef 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -1679,14 +1679,15 @@ int km_migrate(const struct xfrm_selector *sel, u8 = dir, u8 type, const struct xfrm_migrate *m, int num_bundles, const struct xfrm_kmaddress *k, const struct xfrm_encap_tmpl *encap); -struct xfrm_state *xfrm_migrate_state_find(struct xfrm_migrate *m, struct = net *net); +struct xfrm_state *xfrm_migrate_state_find(struct xfrm_migrate *m, struct = net *net, + u32 if_id); struct xfrm_state *xfrm_state_migrate(struct xfrm_state *x, struct xfrm_migrate *m, struct xfrm_encap_tmpl *encap); int xfrm_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, struct xfrm_migrate *m, int num_bundles, struct xfrm_kmaddress *k, struct net *net, - struct xfrm_encap_tmpl *encap); + struct xfrm_encap_tmpl *encap, u32 if_id); #endif =20 int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sp= ort); diff --git a/net/key/af_key.c b/net/key/af_key.c index de24a7d474df..9bf52a09b5ff 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -2623,7 +2623,7 @@ static int pfkey_migrate(struct sock *sk, struct sk_b= uff *skb, } =20 return xfrm_migrate(&sel, dir, XFRM_POLICY_TYPE_MAIN, m, i, - kma ? &k : NULL, net, NULL); + kma ? &k : NULL, net, NULL, 0); =20 out: return err; diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 37b149f63262..02099d113a0a 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -4259,7 +4259,7 @@ static bool xfrm_migrate_selector_match(const struct = xfrm_selector *sel_cmp, } =20 static struct xfrm_policy *xfrm_migrate_policy_find(const struct xfrm_sele= ctor *sel, - u8 dir, u8 type, struct net *net) + u8 dir, u8 type, struct net *net, u32 if_id) { struct xfrm_policy *pol, *ret =3D NULL; struct hlist_head *chain; @@ -4268,7 +4268,8 @@ static struct xfrm_policy *xfrm_migrate_policy_find(c= onst struct xfrm_selector * spin_lock_bh(&net->xfrm.xfrm_policy_lock); chain =3D policy_hash_direct(net, &sel->daddr, &sel->saddr, sel->family, = dir); hlist_for_each_entry(pol, chain, bydst) { - if (xfrm_migrate_selector_match(sel, &pol->selector) && + if ((if_id =3D=3D 0 || pol->if_id =3D=3D if_id) && + xfrm_migrate_selector_match(sel, &pol->selector) && pol->type =3D=3D type) { ret =3D pol; priority =3D ret->priority; @@ -4280,7 +4281,8 @@ static struct xfrm_policy *xfrm_migrate_policy_find(c= onst struct xfrm_selector * if ((pol->priority >=3D priority) && ret) break; =20 - if (xfrm_migrate_selector_match(sel, &pol->selector) && + if ((if_id =3D=3D 0 || pol->if_id =3D=3D if_id) && + xfrm_migrate_selector_match(sel, &pol->selector) && pol->type =3D=3D type) { ret =3D pol; break; @@ -4396,7 +4398,7 @@ static int xfrm_migrate_check(const struct xfrm_migra= te *m, int num_migrate) int xfrm_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, struct xfrm_migrate *m, int num_migrate, struct xfrm_kmaddress *k, struct net *net, - struct xfrm_encap_tmpl *encap) + struct xfrm_encap_tmpl *encap, u32 if_id) { int i, err, nx_cur =3D 0, nx_new =3D 0; struct xfrm_policy *pol =3D NULL; @@ -4415,14 +4417,14 @@ int xfrm_migrate(const struct xfrm_selector *sel, u= 8 dir, u8 type, } =20 /* Stage 1 - find policy */ - if ((pol =3D xfrm_migrate_policy_find(sel, dir, type, net)) =3D=3D NULL) { + if ((pol =3D xfrm_migrate_policy_find(sel, dir, type, net, if_id)) =3D=3D= NULL) { err =3D -ENOENT; goto out; } =20 /* Stage 2 - find and update state(s) */ for (i =3D 0, mp =3D m; i < num_migrate; i++, mp++) { - if ((x =3D xfrm_migrate_state_find(mp, net))) { + if ((x =3D xfrm_migrate_state_find(mp, net, if_id))) { x_cur[nx_cur] =3D x; nx_cur++; xc =3D xfrm_state_migrate(x, mp, encap); diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 100b4b3723e7..291236d7676f 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -1605,7 +1605,8 @@ static struct xfrm_state *xfrm_state_clone(struct xfr= m_state *orig, return NULL; } =20 -struct xfrm_state *xfrm_migrate_state_find(struct xfrm_migrate *m, struct = net *net) +struct xfrm_state *xfrm_migrate_state_find(struct xfrm_migrate *m, struct = net *net, + u32 if_id) { unsigned int h; struct xfrm_state *x =3D NULL; @@ -1621,6 +1622,8 @@ struct xfrm_state *xfrm_migrate_state_find(struct xfr= m_migrate *m, struct net *n continue; if (m->reqid && x->props.reqid !=3D m->reqid) continue; + if (if_id !=3D 0 && x->if_id !=3D if_id) + continue; if (!xfrm_addr_equal(&x->id.daddr, &m->old_daddr, m->old_family) || !xfrm_addr_equal(&x->props.saddr, &m->old_saddr, @@ -1636,6 +1639,8 @@ struct xfrm_state *xfrm_migrate_state_find(struct xfr= m_migrate *m, struct net *n if (x->props.mode !=3D m->mode || x->id.proto !=3D m->proto) continue; + if (if_id !=3D 0 && x->if_id !=3D if_id) + continue; if (!xfrm_addr_equal(&x->id.daddr, &m->old_daddr, m->old_family) || !xfrm_addr_equal(&x->props.saddr, &m->old_saddr, diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index e13198f7e4e9..2acba159327c 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -2592,6 +2592,7 @@ static int xfrm_do_migrate(struct sk_buff *skb, struc= t nlmsghdr *nlh, int n =3D 0; struct net *net =3D sock_net(skb->sk); struct xfrm_encap_tmpl *encap =3D NULL; + u32 if_id =3D 0; =20 if (attrs[XFRMA_MIGRATE] =3D=3D NULL) return -EINVAL; @@ -2616,7 +2617,10 @@ static int xfrm_do_migrate(struct sk_buff *skb, stru= ct nlmsghdr *nlh, return -ENOMEM; } =20 - err =3D xfrm_migrate(&pi->sel, pi->dir, type, m, n, kmp, net, encap); + if (attrs[XFRMA_IF_ID]) + if_id =3D nla_get_u32(attrs[XFRMA_IF_ID]); + + err =3D xfrm_migrate(&pi->sel, pi->dir, type, m, n, kmp, net, encap, if_i= d); =20 kfree(encap); =20 --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 310FEC433EF for ; Thu, 17 Mar 2022 12:58:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235461AbiCQM7B (ORCPT ); Thu, 17 Mar 2022 08:59:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234864AbiCQMx6 (ORCPT ); Thu, 17 Mar 2022 08:53:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A8021F42C9; Thu, 17 Mar 2022 05:51:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EC2D961506; Thu, 17 Mar 2022 12:51:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5947C340ED; Thu, 17 Mar 2022 12:51:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521514; bh=UqwiPp2qBmb+7tKFdE0+ShqjTMU9taITEwrPGtd63H8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IF9kFpZe+cQtuBUPd5luy6+P6uwQStSRWGVYdCWMoCTNQTv8eYC8jkU87n+RzQ0FO ErTXuer2GtIjBDFEXr8BIsgLKE9qJWHcQPIT/3o0g05DqK4fPohA132OBOOB0fh8Vf P2Xgj9YyLQ4ms0tgk1MESZnznlO4rAVvIm72uT4w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yan Yan , Steffen Klassert , Sasha Levin Subject: [PATCH 5.15 04/25] xfrm: Fix xfrm migrate issues when address family changes Date: Thu, 17 Mar 2022 13:45:51 +0100 Message-Id: <20220317124526.435788089@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Yan Yan [ Upstream commit e03c3bba351f99ad932e8f06baa9da1afc418e02 ] xfrm_migrate cannot handle address family change of an xfrm_state. The symptons are the xfrm_state will be migrated to a wrong address, and sending as well as receiving packets wil be broken. This commit fixes it by breaking the original xfrm_state_clone method into two steps so as to update the props.family before running xfrm_init_state. As the result, xfrm_state's inner mode, outer mode, type and IP header length in xfrm_state_migrate can be updated with the new address family. Tested with additions to Android's kernel unit test suite: https://android-review.googlesource.com/c/kernel/tests/+/1885354 Signed-off-by: Yan Yan Signed-off-by: Steffen Klassert Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- net/xfrm/xfrm_state.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 291236d7676f..f7bfa1916968 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -1578,9 +1578,6 @@ static struct xfrm_state *xfrm_state_clone(struct xfr= m_state *orig, memcpy(&x->mark, &orig->mark, sizeof(x->mark)); memcpy(&x->props.smark, &orig->props.smark, sizeof(x->props.smark)); =20 - if (xfrm_init_state(x) < 0) - goto error; - x->props.flags =3D orig->props.flags; x->props.extra_flags =3D orig->props.extra_flags; =20 @@ -1667,6 +1664,11 @@ struct xfrm_state *xfrm_state_migrate(struct xfrm_st= ate *x, if (!xc) return NULL; =20 + xc->props.family =3D m->new_family; + + if (xfrm_init_state(xc) < 0) + goto error; + memcpy(&xc->id.daddr, &m->new_daddr, sizeof(xc->id.daddr)); memcpy(&xc->props.saddr, &m->new_saddr, sizeof(xc->props.saddr)); =20 --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05DCFC433EF for ; Thu, 17 Mar 2022 12:58:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234548AbiCQM5t (ORCPT ); Thu, 17 Mar 2022 08:57:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234881AbiCQMx7 (ORCPT ); Thu, 17 Mar 2022 08:53:59 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 350461F0828; Thu, 17 Mar 2022 05:52:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E96B5B81E01; Thu, 17 Mar 2022 12:51:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 311CDC340E9; Thu, 17 Mar 2022 12:51:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521517; bh=DPdfF6q9H15BXcu0xyHzF22kFQv23DsT8xa/YMq2E1I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KesRhouOAEDzayQww068SyEF8BkpFLpLTMmYPF6zvxr7Y3tJem4lwRP0Kinra1XrM hjXUo1mFvge+FZMCNugoz45FCcoxZBVEd9lkZfkCsg5dUNgfERWR/yQ+1nUFGeqoIF Qv2RZGiQer9biHL2M06aygcB1Zn2TQkdaICrlhfE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Quentin Schulz , Jakob Unterwurzacher , Quentin Schulz , Heiko Stuebner , Sasha Levin Subject: [PATCH 5.15 05/25] arm64: dts: rockchip: fix rk3399-puma eMMC HS400 signal integrity Date: Thu, 17 Mar 2022 13:45:52 +0100 Message-Id: <20220317124526.464713265@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Jakob Unterwurzacher [ Upstream commit 62966cbdda8a92f82d966a45aa671e788b2006f7 ] There are signal integrity issues running the eMMC at 200MHz on Puma RK3399-Q7. Similar to the work-around found for RK3399 Gru boards, lowering the frequency to 100MHz made the eMMC much more stable, so let's lower the frequency to 100MHz. It might be possible to run at 150MHz as on RK3399 Gru boards but only 100MHz was extensively tested. Cc: Quentin Schulz Signed-off-by: Jakob Unterwurzacher Signed-off-by: Quentin Schulz Link: https://lore.kernel.org/r/20220119134948.1444965-1-quentin.schulz@the= obroma-systems.com Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boo= t/dts/rockchip/rk3399-puma.dtsi index 002ece51c3ba..08fa00364b42 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi @@ -439,6 +439,12 @@ }; =20 &sdhci { + /* + * Signal integrity isn't great at 200MHz but 100MHz has proven stable + * enough. + */ + max-frequency =3D <100000000>; + bus-width =3D <8>; mmc-hs400-1_8v; mmc-hs400-enhanced-strobe; --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9A6EC43217 for ; Thu, 17 Mar 2022 12:58:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235418AbiCQM65 (ORCPT ); Thu, 17 Mar 2022 08:58:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234893AbiCQMyB (ORCPT ); Thu, 17 Mar 2022 08:54:01 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A210125CB1; Thu, 17 Mar 2022 05:52:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 79D1DCE233F; Thu, 17 Mar 2022 12:52:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7652EC340E9; Thu, 17 Mar 2022 12:52:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521520; bh=1gCRPyY4vM+iDC3GJxAZQQdACtX+gknDE32JyIAp8tw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kNf4Uh4T9u47mlcfn8FdXbRUTdkYmMhOrBPgqOP09TwgKZx7tVWZO8BxPJEpDWS0A 5lzAEgeEW5G38x/QERRRQEo2+PUMTqLcyeHFXUjIgt12NMYn4VBlLIn+fl4eRLeMPO +zDP8sQ2dpeOX5rCGWTjvFhH0bd0Pu+DpHQpRnyM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krzysztof Kozlowski , Heiko Stuebner , Sasha Levin Subject: [PATCH 5.15 06/25] arm64: dts: rockchip: align pl330 node name with dtschema Date: Thu, 17 Mar 2022 13:45:53 +0100 Message-Id: <20220317124526.492233222@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Krzysztof Kozlowski [ Upstream commit 8fd9415042826c7609c588e5ef45f3e84237785f ] Fixes dtbs_check warnings like: dmac@ff240000: $nodename:0: 'dmac@ff240000' does not match '^dma-controll= er(@.*)?$' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220129175429.298836-1-krzysztof.kozlowski= @canonical.com Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- arch/arm64/boot/dts/rockchip/px30.dtsi | 2 +- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/px30.dtsi b/arch/arm64/boot/dts/r= ockchip/px30.dtsi index 248ebb61aa79..5200d0bbd9e9 100644 --- a/arch/arm64/boot/dts/rockchip/px30.dtsi +++ b/arch/arm64/boot/dts/rockchip/px30.dtsi @@ -711,7 +711,7 @@ clock-names =3D "pclk", "timer"; }; =20 - dmac: dmac@ff240000 { + dmac: dma-controller@ff240000 { compatible =3D "arm,pl330", "arm,primecell"; reg =3D <0x0 0xff240000 0x0 0x4000>; interrupts =3D , diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts= /rockchip/rk3328.dtsi index da84be6f4715..3cbe83e6fb9a 100644 --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi @@ -489,7 +489,7 @@ status =3D "disabled"; }; =20 - dmac: dmac@ff1f0000 { + dmac: dma-controller@ff1f0000 { compatible =3D "arm,pl330", "arm,primecell"; reg =3D <0x0 0xff1f0000 0x0 0x4000>; interrupts =3D , --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 235FAC433F5 for ; Thu, 17 Mar 2022 12:56:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230249AbiCQM5O (ORCPT ); Thu, 17 Mar 2022 08:57:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234898AbiCQMyB (ORCPT ); Thu, 17 Mar 2022 08:54:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F0B81F0CB0; Thu, 17 Mar 2022 05:52:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 091D361240; Thu, 17 Mar 2022 12:52:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13C1BC340EF; Thu, 17 Mar 2022 12:52:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521524; bh=6PZeDCGzWtShOkcat89t0PGQUOlKnHBR17of7pirxH8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WwS6fDOnzmcCtu7ifGhnUBhs6S5l1A/AVi4SAZhsCANui8toWxeY4oHQl8aujTsjz I+iDiGFWtuKqkKyonMKZFUvuYkvlLEWVdKur9rv6gKBMq25aplpTlr+HDZ+H4h8HEe sS4N7dnAgVEQXOkg97Ite8hCfTzQTfcygWbYEtK8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sascha Hauer , Heiko Stuebner , Sasha Levin Subject: [PATCH 5.15 07/25] arm64: dts: rockchip: reorder rk3399 hdmi clocks Date: Thu, 17 Mar 2022 13:45:54 +0100 Message-Id: <20220317124526.519968297@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sascha Hauer [ Upstream commit 2e8a8b5955a000cc655f7e368670518cbb77fe58 ] The binding specifies the clock order to "cec", "grf", "vpll". Reorder the clocks accordingly. Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20220126145549.617165-19-s.hauer@pengutroni= x.de Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts= /rockchip/rk3399.dtsi index 3871c7fd83b0..00f1d036dfe0 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi @@ -1802,10 +1802,10 @@ interrupts =3D ; clocks =3D <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_SFR>, - <&cru PLL_VPLL>, + <&cru SCLK_HDMI_CEC>, <&cru PCLK_VIO_GRF>, - <&cru SCLK_HDMI_CEC>; - clock-names =3D "iahb", "isfr", "vpll", "grf", "cec"; + <&cru PLL_VPLL>; + clock-names =3D "iahb", "isfr", "cec", "grf", "vpll"; power-domains =3D <&power RK3399_PD_HDCP>; reg-io-width =3D <4>; rockchip,grf =3D <&grf>; --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08F7CC4167D for ; Thu, 17 Mar 2022 12:58:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235368AbiCQM64 (ORCPT ); Thu, 17 Mar 2022 08:58:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234903AbiCQMyB (ORCPT ); Thu, 17 Mar 2022 08:54:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B654D1F1601; Thu, 17 Mar 2022 05:52:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4FA64614F4; Thu, 17 Mar 2022 12:52:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43552C340E9; Thu, 17 Mar 2022 12:52:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521527; bh=7mb74pxL/E/U0ndOyBl3xVi6gbWxL6Dd2qqfjxFOegk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yq8JeK31XpcDc9nq/g0RXbc9VzXWo5O82jauEhfx+K95NCHNDN+hyX0A/yZ1RIARO 0V12RKfaBg616fIBAyOCPysqohk/z1Zzx8j36l0wbI5Wnp3jlpR/W5emeq/YOxcie0 h3hjHlewNWtZ5vJiYi3bc0UKQXkMyib2Y8Hn6acE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dinh Nguyen , Sasha Levin Subject: [PATCH 5.15 08/25] arm64: dts: agilex: use the compatible "intel,socfpga-agilex-hsotg" Date: Thu, 17 Mar 2022 13:45:55 +0100 Message-Id: <20220317124526.547683652@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Dinh Nguyen [ Upstream commit 268a491aebc25e6dc7c618903b09ac3a2e8af530 ] The DWC2 USB controller on the Agilex platform does not support clock gating, so use the chip specific "intel,socfpga-agilex-hsotg" compatible. Signed-off-by: Dinh Nguyen Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- arch/arm64/boot/dts/intel/socfpga_agilex.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex.dtsi b/arch/arm64/boo= t/dts/intel/socfpga_agilex.dtsi index 163f33b46e4f..de1e98c99ec5 100644 --- a/arch/arm64/boot/dts/intel/socfpga_agilex.dtsi +++ b/arch/arm64/boot/dts/intel/socfpga_agilex.dtsi @@ -502,7 +502,7 @@ }; =20 usb0: usb@ffb00000 { - compatible =3D "snps,dwc2"; + compatible =3D "intel,socfpga-agilex-hsotg", "snps,dwc2"; reg =3D <0xffb00000 0x40000>; interrupts =3D ; phys =3D <&usbphy0>; @@ -515,7 +515,7 @@ }; =20 usb1: usb@ffb40000 { - compatible =3D "snps,dwc2"; + compatible =3D "intel,socfpga-agilex-hsotg", "snps,dwc2"; reg =3D <0xffb40000 0x40000>; interrupts =3D ; phys =3D <&usbphy0>; --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 239F9C433EF for ; Thu, 17 Mar 2022 12:58:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234332AbiCQM5p (ORCPT ); Thu, 17 Mar 2022 08:57:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234908AbiCQMyC (ORCPT ); Thu, 17 Mar 2022 08:54:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 046CB1EE8E5; Thu, 17 Mar 2022 05:52:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 93993614F0; Thu, 17 Mar 2022 12:52:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D18E5C340E9; Thu, 17 Mar 2022 12:52:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521538; bh=R/C8STymm8ReCkBQLt18z2XcBrbpXSFwqEfZsjQ2/iE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JUZj78snFCjDuFVcGosogCXj3XRkG8vjKswoSK5JPJ2FrSK+uGU0k9rDLiOwIl94+ nVb/BpBfjd7SaTHusMffU3DW1iOKTYtJ9nul9XviSVKSxHJzJ1ao5VVNm0oMDo/CzO vDTWdbjHAohB3N1p5KXHbCVuOQZmZ1mNAPkyoY4Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sascha Hauer , Heiko Stuebner , Sasha Levin Subject: [PATCH 5.15 09/25] ARM: dts: rockchip: reorder rk322x hmdi clocks Date: Thu, 17 Mar 2022 13:45:56 +0100 Message-Id: <20220317124526.575679406@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sascha Hauer [ Upstream commit be4e65bdffab5f588044325117df77dad7e9c45a ] The binding specifies the clock order to "iahb", "isfr", "cec". Reorder the clocks accordingly. Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20220210142353.3420859-1-s.hauer@pengutroni= x.de Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- arch/arm/boot/dts/rk322x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi index 75af99c76d7e..f31cf1df892b 100644 --- a/arch/arm/boot/dts/rk322x.dtsi +++ b/arch/arm/boot/dts/rk322x.dtsi @@ -718,8 +718,8 @@ interrupts =3D ; assigned-clocks =3D <&cru SCLK_HDMI_PHY>; assigned-clock-parents =3D <&hdmi_phy>; - clocks =3D <&cru SCLK_HDMI_HDCP>, <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI= _CEC>; - clock-names =3D "isfr", "iahb", "cec"; + clocks =3D <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>, <&cru SCLK_HDMI= _CEC>; + clock-names =3D "iahb", "isfr", "cec"; pinctrl-names =3D "default"; pinctrl-0 =3D <&hdmii2c_xfer &hdmi_hpd &hdmi_cec>; resets =3D <&cru SRST_HDMI_P>; --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7BF8C4167B for ; Thu, 17 Mar 2022 12:58:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235198AbiCQM6p (ORCPT ); Thu, 17 Mar 2022 08:58:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234318AbiCQMxD (ORCPT ); Thu, 17 Mar 2022 08:53:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BC8E1F6F36; Thu, 17 Mar 2022 05:50:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BE2646124B; Thu, 17 Mar 2022 12:50:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9CB1EC340E9; Thu, 17 Mar 2022 12:50:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521451; bh=h5dWFH7rvdGWUVv5SR/PyniHXkWqs3usscoC++mnayc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nwA+NldyMmanhJDtHjOa0d1xgrRwTw/kbdISsM0qfn95Qp3wtYlhueCOWfT9fl5UV Ywt2v4DHhXC9e7Kxm3i+/2tK/W2qCZ5Uo4JrBFBReflX1WY70KNI0yzDnHeK3g1T/t SEjYtsrRh+ZtH31RztmLXLyebrkPvLSLpsttA9ko= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Corentin Labbe , Krzysztof Kozlowski , Heiko Stuebner , Sasha Levin Subject: [PATCH 5.15 10/25] ARM: dts: rockchip: fix a typo on rk3288 crypto-controller Date: Thu, 17 Mar 2022 13:45:57 +0100 Message-Id: <20220317124526.604280474@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Corentin Labbe [ Upstream commit 3916c3619599a3970d3e6f98fb430b7c46266ada ] crypto-controller had a typo, fix it. In the same time, rename it to just crypto Signed-off-by: Corentin Labbe Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220209120355.1985707-1-clabbe@baylibre.com Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- arch/arm/boot/dts/rk3288.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index 4dcdcf17c977..66ff5db53c5a 100644 --- a/arch/arm/boot/dts/rk3288.dtsi +++ b/arch/arm/boot/dts/rk3288.dtsi @@ -971,7 +971,7 @@ status =3D "disabled"; }; =20 - crypto: cypto-controller@ff8a0000 { + crypto: crypto@ff8a0000 { compatible =3D "rockchip,rk3288-crypto"; reg =3D <0x0 0xff8a0000 0x0 0x4000>; interrupts =3D ; --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E08A9C433FE for ; Thu, 17 Mar 2022 12:54:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234240AbiCQM4B (ORCPT ); Thu, 17 Mar 2022 08:56:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234332AbiCQMxD (ORCPT ); Thu, 17 Mar 2022 08:53:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD4051FAA24; Thu, 17 Mar 2022 05:50:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0F7B261506; Thu, 17 Mar 2022 12:50:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C5E7C340ED; Thu, 17 Mar 2022 12:50:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521454; bh=zRZO4C73CEe0cGTlpqWmGRS66SbFnS+B8DijLjV/NHc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G0XSga6xqz45cEYIKYxp4RkqVHVXiVbWZ5CLTynLU8ZHhojyg6yvDZRwRqPJDGBEK jhvrM5Ftca/OjfIQLbRSRtbT0LhNJJ6p12qBOL9tlHbuGsmmbEP3MwhQXpa+R/htYz b3sUr7svwePyOfrdgadkULf8+bAEvBdI/igkkK7o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Berg , Sasha Levin Subject: [PATCH 5.15 11/25] mac80211: refuse aggregations sessions before authorized Date: Thu, 17 Mar 2022 13:45:58 +0100 Message-Id: <20220317124526.633142290@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Johannes Berg [ Upstream commit a6bce78262f5dd4b50510f0aa47f3995f7b185f3 ] If an MFP station isn't authorized, the receiver will (or at least should) drop the action frame since it's a robust management frame, but if we're not authorized we haven't installed keys yet. Refuse attempts to start a session as they'd just time out. Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20220203201528.ff4d5679dce9.I34bb1f2bc341e1= 61af2d6faf74f91b332ba11285@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- net/mac80211/agg-tx.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c index 74a878f213d3..1deb3d874a4b 100644 --- a/net/mac80211/agg-tx.c +++ b/net/mac80211/agg-tx.c @@ -9,7 +9,7 @@ * Copyright 2007, Michael Wu * Copyright 2007-2010, Intel Corporation * Copyright(c) 2015-2017 Intel Deutschland GmbH - * Copyright (C) 2018 - 2021 Intel Corporation + * Copyright (C) 2018 - 2022 Intel Corporation */ =20 #include @@ -626,6 +626,14 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta= *pubsta, u16 tid, return -EINVAL; } =20 + if (test_sta_flag(sta, WLAN_STA_MFP) && + !test_sta_flag(sta, WLAN_STA_AUTHORIZED)) { + ht_dbg(sdata, + "MFP STA not authorized - deny BA session request %pM tid %d\n", + sta->sta.addr, tid); + return -EINVAL; + } + /* * 802.11n-2009 11.5.1.1: If the initiating STA is an HT STA, is a * member of an IBSS, and has no other existing Block Ack agreement --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BAEFC433FE for ; Thu, 17 Mar 2022 12:54:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234388AbiCQM4M (ORCPT ); Thu, 17 Mar 2022 08:56:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234360AbiCQMxG (ORCPT ); Thu, 17 Mar 2022 08:53:06 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E8381F0CA5; Thu, 17 Mar 2022 05:51:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 898C5CE2340; Thu, 17 Mar 2022 12:50:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A556C340E9; Thu, 17 Mar 2022 12:50:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521458; bh=sy3aP4fnh8SyAGLvHPsjL4Mx6PXZBmUBSdow+IfmEWg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D/wjNKFJZB1+2uLAxw34E9qLGoxTCyagQoJASEc8XZ7wqMroTKIQ/e+zIcbJoslQZ CuB2wEmu8hS2jOapwyNlOT/Qh7kS4NvajFhs0r/KDPie0a62JuTvKtYDey9BXy+rDP F7ipnwZg5FXPGuqJCNRrRlW9vo8A9gpGLWWN+7vk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Lobakin , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 5.15 12/25] MIPS: smp: fill in sibling and core maps earlier Date: Thu, 17 Mar 2022 13:45:59 +0100 Message-Id: <20220317124526.661041444@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Lobakin [ Upstream commit f2703def339c793674010cc9f01bfe4980231808 ] After enabling CONFIG_SCHED_CORE (landed during 5.14 cycle), 2-core 2-thread-per-core interAptiv (CPS-driven) started emitting the following: [ 0.025698] CPU1 revision is: 0001a120 (MIPS interAptiv (multi)) [ 0.048183] ------------[ cut here ]------------ [ 0.048187] WARNING: CPU: 1 PID: 0 at kernel/sched/core.c:6025 sched_cor= e_cpu_starting+0x198/0x240 [ 0.048220] Modules linked in: [ 0.048233] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.17.0-rc3+ #35 b7= b319f24073fd9a3c2aa7ad15fb7993eec0b26f [ 0.048247] Stack : 817f0000 00000004 327804c8 810eb050 00000000 0000000= 4 00000000 c314fdd1 [ 0.048278] 830cbd64 819c0000 81800000 817f0000 83070bf4 0000000= 1 830cbd08 00000000 [ 0.048307] 00000000 00000000 815fcbc4 00000000 00000000 0000000= 0 00000000 00000000 [ 0.048334] 00000000 00000000 00000000 00000000 817f0000 0000000= 0 00000000 817f6f34 [ 0.048361] 817f0000 818a3c00 817f0000 00000004 00000000 0000000= 0 4dc33260 0018c933 [ 0.048389] ... [ 0.048396] Call Trace: [ 0.048399] [<8105a7bc>] show_stack+0x3c/0x140 [ 0.048424] [<8131c2a0>] dump_stack_lvl+0x60/0x80 [ 0.048440] [<8108b5c0>] __warn+0xc0/0xf4 [ 0.048454] [<8108b658>] warn_slowpath_fmt+0x64/0x10c [ 0.048467] [<810bd418>] sched_core_cpu_starting+0x198/0x240 [ 0.048483] [<810c6514>] sched_cpu_starting+0x14/0x80 [ 0.048497] [<8108c0f8>] cpuhp_invoke_callback_range+0x78/0x140 [ 0.048510] [<8108d914>] notify_cpu_starting+0x94/0x140 [ 0.048523] [<8106593c>] start_secondary+0xbc/0x280 [ 0.048539] [ 0.048543] ---[ end trace 0000000000000000 ]--- [ 0.048636] Synchronize counters for CPU 1: done. ...for each but CPU 0/boot. Basic debug printks right before the mentioned line say: [ 0.048170] CPU: 1, smt_mask: So smt_mask, which is sibling mask obviously, is empty when entering the function. This is critical, as sched_core_cpu_starting() calculates core-scheduling parameters only once per CPU start, and it's crucial to have all the parameters filled in at that moment (at least it uses cpu_smt_mask() which in fact is `&cpu_sibling_map[cpu]` on MIPS). A bit of debugging led me to that set_cpu_sibling_map() performing the actual map calculation, was being invocated after notify_cpu_start(), and exactly the latter function starts CPU HP callback round (sched_core_cpu_starting() is basically a CPU HP callback). While the flow is same on ARM64 (maps after the notifier, although before calling set_cpu_online()), x86 started calculating sibling maps earlier than starting the CPU HP callbacks in Linux 4.14 (see [0] for the reference). Neither me nor my brief tests couldn't find any potential caveats in calculating the maps right after performing delay calibration, but the WARN splat is now gone. The very same debug prints now yield exactly what I expected from them: [ 0.048433] CPU: 1, smt_mask: 0-1 [0] https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?= id=3D76ce7cfe35ef Signed-off-by: Alexander Lobakin Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- arch/mips/kernel/smp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index d542fb7af3ba..1986d1309410 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c @@ -351,6 +351,9 @@ asmlinkage void start_secondary(void) cpu =3D smp_processor_id(); cpu_data[cpu].udelay_val =3D loops_per_jiffy; =20 + set_cpu_sibling_map(cpu); + set_cpu_core_map(cpu); + cpumask_set_cpu(cpu, &cpu_coherent_mask); notify_cpu_starting(cpu); =20 @@ -362,9 +365,6 @@ asmlinkage void start_secondary(void) /* The CPU is running and counters synchronised, now mark it online */ set_cpu_online(cpu, true); =20 - set_cpu_sibling_map(cpu); - set_cpu_core_map(cpu); - calculate_cpu_foreign_map(); =20 /* --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E762CC4167E for ; Thu, 17 Mar 2022 12:58:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235300AbiCQM6w (ORCPT ); Thu, 17 Mar 2022 08:58:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234425AbiCQMxK (ORCPT ); Thu, 17 Mar 2022 08:53:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DB851FB520; Thu, 17 Mar 2022 05:51:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DC428B81DA1; Thu, 17 Mar 2022 12:51:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E34FBC340E9; Thu, 17 Mar 2022 12:51:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521461; bh=qyUSrm97P+ZfSNFz2/ZXRa42gbGKX1WKDF/8LJIGHEg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vtJPsx2uLNNX0EilW8d1Yyjml/qoK72gP+vQwX0LV7t+wTOE2kaDCDRFh16ew2sKG hMvobuIJvnJE2Y4TTE+Q1IxSgD0UxjB2gtxalAxssi/a3UY4xErbCxx6EeBnq8CXBO M0pkI0gy3v9PM7f5Vvzzfh4VECCJRG/S8S4wqDjM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Julian Braha , "Russell King (Oracle)" , Sasha Levin Subject: [PATCH 5.15 13/25] ARM: 9178/1: fix unmet dependency on BITREVERSE for HAVE_ARCH_BITREVERSE Date: Thu, 17 Mar 2022 13:46:00 +0100 Message-Id: <20220317124526.687708179@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Julian Braha [ Upstream commit 11c57c3ba94da74c3446924260e34e0b1950b5d7 ] Resending this to properly add it to the patch tracker - thanks for letting me know, Arnd :) When ARM is enabled, and BITREVERSE is disabled, Kbuild gives the following warning: WARNING: unmet direct dependencies detected for HAVE_ARCH_BITREVERSE Depends on [n]: BITREVERSE [=3Dn] Selected by [y]: - ARM [=3Dy] && (CPU_32v7M [=3Dn] || CPU_32v7 [=3Dy]) && !CPU_32v6 [=3Dn] This is because ARM selects HAVE_ARCH_BITREVERSE without selecting BITREVERSE, despite HAVE_ARCH_BITREVERSE depending on BITREVERSE. This unmet dependency bug was found by Kismet, a static analysis tool for Kconfig. Please advise if this is not the appropriate solution. Signed-off-by: Julian Braha Signed-off-by: Russell King (Oracle) Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- lib/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/Kconfig b/lib/Kconfig index 5e7165e6a346..fa4b10322efc 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -45,7 +45,6 @@ config BITREVERSE config HAVE_ARCH_BITREVERSE bool default n - depends on BITREVERSE help This option enables the use of hardware bit-reversal instructions on architectures which support such operations. --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3088C4321E for ; Thu, 17 Mar 2022 12:58:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235254AbiCQM6s (ORCPT ); Thu, 17 Mar 2022 08:58:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234466AbiCQMxO (ORCPT ); Thu, 17 Mar 2022 08:53:14 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E3E21D12F1; Thu, 17 Mar 2022 05:51:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 99AF2B81E5C; Thu, 17 Mar 2022 12:51:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5709C340E9; Thu, 17 Mar 2022 12:51:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521465; bh=6tcnReq4dlKG8UQNN1H5WqTssEeBvARoDbZQTqK+57o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rdXpn4qvUyTPq//TO03egpWjoNYwtyb00fbkw+UL8n0qavIwjNGcTPxoMEmzRpUy9 Mnb/it9COg3TXEjyUKe9+JE3NxWfPAgpTCB2xSSTPfo3stt6zGR6/rhvYjVSyFoxlp brGYUNBP+tjXQXGMWynhj978BrwXYZAdQG+DpupM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luiz Augusto von Dentz , Marcel Holtmann , Sasha Levin Subject: [PATCH 5.15 14/25] Bluetooth: hci_core: Fix leaking sent_cmd skb Date: Thu, 17 Mar 2022 13:46:01 +0100 Message-Id: <20220317124526.716389346@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Luiz Augusto von Dentz [ Upstream commit dd3b1dc3dd050f1f47cd13e300732852414270f8 ] sent_cmd memory is not freed before freeing hci_dev causing it to leak it contents. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- net/bluetooth/hci_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 53f1b08017aa..c67390367cc2 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -4083,6 +4083,7 @@ void hci_release_dev(struct hci_dev *hdev) hci_dev_unlock(hdev); =20 ida_simple_remove(&hci_index_ida, hdev->id); + kfree_skb(hdev->sent_cmd); kfree(hdev); } EXPORT_SYMBOL(hci_release_dev); --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EFA6C433FE for ; Thu, 17 Mar 2022 12:55:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234350AbiCQM4R (ORCPT ); Thu, 17 Mar 2022 08:56:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234497AbiCQMxQ (ORCPT ); Thu, 17 Mar 2022 08:53:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 536831FD2F0; Thu, 17 Mar 2022 05:51:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 81C4661021; Thu, 17 Mar 2022 12:51:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89788C340E9; Thu, 17 Mar 2022 12:51:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521468; bh=xYDt82oztVLPKZHK4RGXMtKudy0jz5x/oNRMn0IWQ5M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V1mXoZnBy3nzmfwQwCEDyS4s9eOCK9as8aIIVqWC9AezUIrzZhL7OWk9srg/NCLE1 AMp0SwSt+TFvAvO2jPd51QFn6mcxe66YYglhIM979cwHRzVqkjKnRKXJOPF2k6gC3c ISgQjJPItDl5/1Sh8o3asMJ+mH9fV/XwLbg1hdvc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pavel Machek , Lad Prabhakar , Ulrich Hecht , Marc Kleine-Budde , Sasha Levin Subject: [PATCH 5.15 15/25] can: rcar_canfd: rcar_canfd_channel_probe(): register the CAN device when fully ready Date: Thu, 17 Mar 2022 13:46:02 +0100 Message-Id: <20220317124526.744846436@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Lad Prabhakar [ Upstream commit c5048a7b2c23ab589f3476a783bd586b663eda5b ] Register the CAN device only when all the necessary initialization is completed. This patch makes sure all the data structures and locks are initialized before registering the CAN device. Link: https://lore.kernel.org/all/20220221225935.12300-1-prabhakar.mahadev-= lad.rj@bp.renesas.com Reported-by: Pavel Machek Signed-off-by: Lad Prabhakar Reviewed-by: Pavel Machek Reviewed-by: Ulrich Hecht Signed-off-by: Marc Kleine-Budde Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- drivers/net/can/rcar/rcar_canfd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_= canfd.c index 388521e70837..2f44c567ebd7 100644 --- a/drivers/net/can/rcar/rcar_canfd.c +++ b/drivers/net/can/rcar/rcar_canfd.c @@ -1720,15 +1720,15 @@ static int rcar_canfd_channel_probe(struct rcar_can= fd_global *gpriv, u32 ch, =20 netif_napi_add(ndev, &priv->napi, rcar_canfd_rx_poll, RCANFD_NAPI_WEIGHT); + spin_lock_init(&priv->tx_lock); + devm_can_led_init(ndev); + gpriv->ch[priv->channel] =3D priv; err =3D register_candev(ndev); if (err) { dev_err(&pdev->dev, "register_candev() failed, error %d\n", err); goto fail_candev; } - spin_lock_init(&priv->tx_lock); - devm_can_led_init(ndev); - gpriv->ch[priv->channel] =3D priv; dev_info(&pdev->dev, "device registered (channel %u)\n", priv->channel); return 0; =20 --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3306AC433EF for ; Thu, 17 Mar 2022 12:55:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234398AbiCQM4Y (ORCPT ); Thu, 17 Mar 2022 08:56:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234550AbiCQMxT (ORCPT ); Thu, 17 Mar 2022 08:53:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA90E1FDFF1; Thu, 17 Mar 2022 05:51:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2BDF161240; Thu, 17 Mar 2022 12:51:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23D8EC340EF; Thu, 17 Mar 2022 12:51:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521472; bh=18sop7HHeHWk2N9tOaxxTwb116X8umHAw2ytwpnKPGs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mn3KS5DFMzll3jRsoz5whsQVMqRyhuA2qMPfszOH8USfDzeeNDy5bqM2/rpm4F5PH WNvHqZncCU63s1eVynEA7S/M4aBFkRmoU1NwJQ1eHUhzqtyOKa7s27bDX5wE52OaCM 9vaeI+D1oYnvDYbk0B7ddZ2+rUp/ORbsIe+W+k/c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, TOTE Robot , Jia-Ju Bai , "David S. Miller" , Sasha Levin Subject: [PATCH 5.15 16/25] atm: firestream: check the return value of ioremap() in fs_init() Date: Thu, 17 Mar 2022 13:46:03 +0100 Message-Id: <20220317124526.773280934@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Jia-Ju Bai [ Upstream commit d4e26aaea7f82ba884dcb4acfe689406bc092dc3 ] The function ioremap() in fs_init() can fail, so its return value should be checked. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- drivers/atm/firestream.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index 3bc3c314a467..4f67404fe64c 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c @@ -1676,6 +1676,8 @@ static int fs_init(struct fs_dev *dev) dev->hw_base =3D pci_resource_start(pci_dev, 0); =20 dev->base =3D ioremap(dev->hw_base, 0x1000); + if (!dev->base) + return 1; =20 reset_chip (dev); =20 --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DFF6C433F5 for ; Thu, 17 Mar 2022 12:55:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234330AbiCQM41 (ORCPT ); Thu, 17 Mar 2022 08:56:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234613AbiCQMxV (ORCPT ); Thu, 17 Mar 2022 08:53:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CEF11FE55B; Thu, 17 Mar 2022 05:51:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CEE8161506; Thu, 17 Mar 2022 12:51:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 975A5C340ED; Thu, 17 Mar 2022 12:51:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521476; bh=97Nn50gt58l93v/9KvAPm/j6wwDc3B/WHx2XjMzWcM4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q9+nYsRXCh0GAVn4PjMd4JLzIPSAk01CA0dItnQl5Srxy2pYznpOi0lDWmdMCgozp t/kzlRba+D0Q8/LjhYm8i0Mcag4ZwkfqpOLNds3Vw1Q6H9qoRy8WpPoT48MsQ4lxP/ +UKYv6aaQiUaJgPuhj1qzkMYdOpTRUSRCDh5URyQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Golan Ben Ami , Luca Coelho , Johannes Berg , Sasha Levin Subject: [PATCH 5.15 17/25] iwlwifi: dont advertise TWT support Date: Thu, 17 Mar 2022 13:46:04 +0100 Message-Id: <20220317124526.800881022@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Golan Ben Ami [ Upstream commit 1db5fcbba2631277b78d7f8aff99c9607d29f6d8 ] Some APs misbehave when TWT is used and cause our firmware to crash. We don't know a reasonable way to detect and work around this problem in the FW yet. To prevent these crashes, disable TWT in the driver by stopping to advertise TWT support. Link: https://bugzilla.kernel.org/show_bug.cgi?id=3D215523 Signed-off-by: Golan Ben Ami [reworded the commit message] Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/20220301072926.153969-1-luca@coelho.fi Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 3 +-- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/n= et/wireless/intel/iwlwifi/iwl-nvm-parse.c index 475f951d4b1e..fc40cca096c2 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c @@ -541,8 +541,7 @@ static const struct ieee80211_sband_iftype_data iwl_he_= capa[] =3D { .has_he =3D true, .he_cap_elem =3D { .mac_cap_info[0] =3D - IEEE80211_HE_MAC_CAP0_HTC_HE | - IEEE80211_HE_MAC_CAP0_TWT_REQ, + IEEE80211_HE_MAC_CAP0_HTC_HE, .mac_cap_info[1] =3D IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_16US | IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8, diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/ne= t/wireless/intel/iwlwifi/mvm/mac80211.c index 750217393f48..56c7a68a6491 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -295,7 +295,6 @@ static const u8 he_if_types_ext_capa_sta[] =3D { [0] =3D WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING, [2] =3D WLAN_EXT_CAPA3_MULTI_BSSID_SUPPORT, [7] =3D WLAN_EXT_CAPA8_OPMODE_NOTIF, - [9] =3D WLAN_EXT_CAPA10_TWT_REQUESTER_SUPPORT, }; =20 static const struct wiphy_iftype_ext_capab he_iftypes_ext_capa[] =3D { --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84223C433EF for ; Thu, 17 Mar 2022 12:55:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232273AbiCQM4e (ORCPT ); Thu, 17 Mar 2022 08:56:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234641AbiCQMxX (ORCPT ); Thu, 17 Mar 2022 08:53:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D84A31F42F9; Thu, 17 Mar 2022 05:51:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9AF7BB81E5C; Thu, 17 Mar 2022 12:51:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D021EC340E9; Thu, 17 Mar 2022 12:51:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521480; bh=uupnt2lHilMC53ou54V1UvD3QXZW+C7+LxzkOSFd6Zo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jFKXzkHw+M7eFYAld6Zc4HuDGj5OS2RJI1E/CtDx5g8u7yV6gZTT0ArQvhQJqMnj3 0PmMzHQWETYIZTDJ+a0yu8F73vVZj/t7qkKJFInbJqIbV7Ov8Ya01qKk6LFfNhPlbS wUjs3OATjpvRW01bYtwTfqQWxXFdlZYejZ+a1JFw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jani Nikula , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , dri-devel@lists.freedesktop.org, Manasi Navare , Sasha Levin Subject: [PATCH 5.15 18/25] drm/vrr: Set VRR capable prop only if it is attached to connector Date: Thu, 17 Mar 2022 13:46:05 +0100 Message-Id: <20220317124526.828551088@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Manasi Navare [ Upstream commit 62929726ef0ec72cbbe9440c5d125d4278b99894 ] VRR capable property is not attached by default to the connector It is attached only if VRR is supported. So if the driver tries to call drm core set prop function without it being attached that causes NULL dereference. Cc: Jani Nikula Cc: Ville Syrj=C3=A4l=C3=A4 Cc: dri-devel@lists.freedesktop.org Signed-off-by: Manasi Navare Reviewed-by: Ville Syrj=C3=A4l=C3=A4 Link: https://patchwork.freedesktop.org/patch/msgid/20220225013055.9282-1-m= anasi.d.navare@intel.com Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- drivers/gpu/drm/drm_connector.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connecto= r.c index 2ba257b1ae20..e9b7926d9b66 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -2233,6 +2233,9 @@ EXPORT_SYMBOL(drm_connector_atomic_hdr_metadata_equal= ); void drm_connector_set_vrr_capable_property( struct drm_connector *connector, bool capable) { + if (!connector->vrr_capable_property) + return; + drm_object_property_set_value(&connector->base, connector->vrr_capable_property, capable); --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2C14C433EF for ; Thu, 17 Mar 2022 12:55:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234352AbiCQM4l (ORCPT ); Thu, 17 Mar 2022 08:56:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234640AbiCQMxX (ORCPT ); Thu, 17 Mar 2022 08:53:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B862D1F5186; Thu, 17 Mar 2022 05:51:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5332061021; Thu, 17 Mar 2022 12:51:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D98DC340EF; Thu, 17 Mar 2022 12:51:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521483; bh=Iqwh5RWoW5jbhU7n09L6jNGAntnAJR+hnRZr6bdNjKk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=00/l4L63nO07HsXlBwQt9aWi322Vm+D4KlRVLsupmPEPpQy/iFZRf59tsoh9rT1wo BgjvNbYxIfN3oTfZKw1jfKrkOSYq7BmATXkhn8JLnawmvDPgMcd2482xyOBKxNgR9N u7iHSTX1ls7/RgphX+LdhJPLaNL4nsnk6GLokk+Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sreeramya Soratkal , Johannes Berg , Sasha Levin Subject: [PATCH 5.15 19/25] nl80211: Update bss channel on channel switch for P2P_CLIENT Date: Thu, 17 Mar 2022 13:46:06 +0100 Message-Id: <20220317124526.857573122@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sreeramya Soratkal [ Upstream commit e50b88c4f076242358b66ddb67482b96947438f2 ] The wdev channel information is updated post channel switch only for the station mode and not for the other modes. Due to this, the P2P client still points to the old value though it moved to the new channel when the channel change is induced from the P2P GO. Update the bss channel after CSA channel switch completion for P2P client interface as well. Signed-off-by: Sreeramya Soratkal Link: https://lore.kernel.org/r/1646114600-31479-1-git-send-email-quic_ssra= mya@quicinc.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- net/wireless/nl80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 99564db14aa1..2f9ead98a9da 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -17525,7 +17525,8 @@ void cfg80211_ch_switch_notify(struct net_device *d= ev, wdev->chandef =3D *chandef; wdev->preset_chandef =3D *chandef; =20 - if (wdev->iftype =3D=3D NL80211_IFTYPE_STATION && + if ((wdev->iftype =3D=3D NL80211_IFTYPE_STATION || + wdev->iftype =3D=3D NL80211_IFTYPE_P2P_CLIENT) && !WARN_ON(!wdev->current_bss)) cfg80211_update_assoc_bss_entry(wdev, chandef->chan); =20 --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7686C433F5 for ; Thu, 17 Mar 2022 12:55:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234379AbiCQM4z (ORCPT ); Thu, 17 Mar 2022 08:56:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234706AbiCQMx0 (ORCPT ); Thu, 17 Mar 2022 08:53:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CF051FE579; Thu, 17 Mar 2022 05:51:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DBC9361527; Thu, 17 Mar 2022 12:51:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3288C340E9; Thu, 17 Mar 2022 12:51:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521493; bh=lZ6F42Gdq8qQqyDaBwpPUjTLw8aAQQXBNbxuiWWX614=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QtA4/rYyz/rWuMxxFoU4L9PEKimaeXJwxs16wvf/8mXi5zvaumiPjcQUCLiLMZD9k GRcRs3rwQ/3az/iZ0/0vBUK4Y4W3pkud2pqXpqBLk9+RkMEeJf9Eadkm7NIylZjBXb FFvJGVdiRIcL5CDh7Py2NOBCObicWv9FSIxgYqr8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , John Fastabend , Jakub Sitnicki , Daniel Borkmann , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.15 20/25] tcp: make tcp_read_sock() more robust Date: Thu, 17 Mar 2022 13:46:07 +0100 Message-Id: <20220317124526.885613695@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Eric Dumazet [ Upstream commit e3d5ea2c011ecb16fb94c56a659364e6b30fac94 ] If recv_actor() returns an incorrect value, tcp_read_sock() might loop forever. Instead, issue a one time warning and make sure to make progress. Signed-off-by: Eric Dumazet Acked-by: John Fastabend Acked-by: Jakub Sitnicki Acked-by: Daniel Borkmann Link: https://lore.kernel.org/r/20220302161723.3910001-2-eric.dumazet@gmail= .com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- net/ipv4/tcp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index f48f1059b31a..ef68d55e0944 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -1663,11 +1663,13 @@ int tcp_read_sock(struct sock *sk, read_descriptor_= t *desc, if (!copied) copied =3D used; break; - } else if (used <=3D len) { - seq +=3D used; - copied +=3D used; - offset +=3D used; } + if (WARN_ON_ONCE(used > len)) + used =3D len; + seq +=3D used; + copied +=3D used; + offset +=3D used; + /* If recv_actor drops the lock (e.g. TCP splice * receive) the skb pointer might be invalid when * getting here: tcp_collapse might have deleted it --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9CF1C433FE for ; Thu, 17 Mar 2022 12:55:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232126AbiCQM47 (ORCPT ); Thu, 17 Mar 2022 08:56:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234777AbiCQMxs (ORCPT ); Thu, 17 Mar 2022 08:53:48 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EA221FF205; Thu, 17 Mar 2022 05:51:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5AEB3B81E01; Thu, 17 Mar 2022 12:51:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B3DEC340E9; Thu, 17 Mar 2022 12:51:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521497; bh=OQdhJ2GZ5rK4QlrPcNeTaZV+1fFScNNo3kD9q3ZRwbM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cwGjoN+8fTw7uIkwB+uNffOWaqd+aDzfxCPNXUslAuMW73vXyZactsd/ZOczbryDc guvPoyJjXVwD1Up/wcg7cVSn8w0EIOPaAipuB0Zu4h7fLk35w+fmOy3xcAGvq4rV2l 5q5XaFOlSOe0sfwvii+WzM0F/0+dkhzGQK4/05PA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Niels Dossche , Martin Habets , "David S. Miller" , Sasha Levin Subject: [PATCH 5.15 21/25] sfc: extend the locking on mcdi->seqno Date: Thu, 17 Mar 2022 13:46:08 +0100 Message-Id: <20220317124526.913563429@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Niels Dossche [ Upstream commit f1fb205efb0ccca55626fd4ef38570dd16b44719 ] seqno could be read as a stale value outside of the lock. The lock is already acquired to protect the modification of seqno against a possible race condition. Place the reading of this value also inside this locking to protect it against a possible race condition. Signed-off-by: Niels Dossche Acked-by: Martin Habets Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- drivers/net/ethernet/sfc/mcdi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcd= i.c index be6bfd6b7ec7..50baf62b2cbc 100644 --- a/drivers/net/ethernet/sfc/mcdi.c +++ b/drivers/net/ethernet/sfc/mcdi.c @@ -163,9 +163,9 @@ static void efx_mcdi_send_request(struct efx_nic *efx, = unsigned cmd, /* Serialise with efx_mcdi_ev_cpl() and efx_mcdi_ev_death() */ spin_lock_bh(&mcdi->iface_lock); ++mcdi->seqno; + seqno =3D mcdi->seqno & SEQ_MASK; spin_unlock_bh(&mcdi->iface_lock); =20 - seqno =3D mcdi->seqno & SEQ_MASK; xflags =3D 0; if (mcdi->mode =3D=3D MCDI_MODE_EVENTS) xflags |=3D MCDI_HEADER_XFLAGS_EVREQ; --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEC02C433EF for ; Thu, 17 Mar 2022 12:55:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234251AbiCQM5H (ORCPT ); Thu, 17 Mar 2022 08:57:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234819AbiCQMx4 (ORCPT ); Thu, 17 Mar 2022 08:53:56 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99F321FF237; Thu, 17 Mar 2022 05:51:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 39548B81E5C; Thu, 17 Mar 2022 12:51:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D89BC340ED; Thu, 17 Mar 2022 12:51:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521501; bh=nKlrg4WLNzAY8c1UW0u3z2lgSy1eTQph437UIaSbeFc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qw9TBrFvEsoXkMqWscenl9pwQMU6zQdM3HYe68kuKSuUrL+4s7p5e/J2xG57adVJd OsT65Yf1ybig7mxu1Y394mMdSW1BZTaZgSCK2qFQQKWMISTj8NybFSkSLXn+G33se3 L/ZK7KxyMGISghKNv2I7CuxaoD4qjrUL3wrf4w+o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , "David S. Miller" , Sasha Levin Subject: [PATCH 5.15 22/25] bnx2: Fix an error message Date: Thu, 17 Mar 2022 13:46:09 +0100 Message-Id: <20220317124526.941798300@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Christophe JAILLET [ Upstream commit 8ccffe9ac3239e549beaa0a9d5e1a1eac94e866c ] Fix an error message and report the correct failing function. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- drivers/net/ethernet/broadcom/bnx2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/br= oadcom/bnx2.c index 8c83973adca5..9d70d908c064 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c @@ -8212,7 +8212,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_devi= ce *dev) rc =3D dma_set_coherent_mask(&pdev->dev, persist_dma_mask); if (rc) { dev_err(&pdev->dev, - "pci_set_consistent_dma_mask failed, aborting\n"); + "dma_set_coherent_mask failed, aborting\n"); goto err_out_unmap; } } else if ((rc =3D dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) !=3D 0) { --=20 2.34.1 From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB709C433EF for ; Thu, 17 Mar 2022 12:55:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234396AbiCQM5B (ORCPT ); Thu, 17 Mar 2022 08:57:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234827AbiCQMx5 (ORCPT ); Thu, 17 Mar 2022 08:53:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93A311F125F; Thu, 17 Mar 2022 05:51:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1B229614F0; Thu, 17 Mar 2022 12:51:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAA87C340E9; Thu, 17 Mar 2022 12:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521505; bh=imLRbNBIttWRNaw4IAFVGr5nNbkEISMaVibcAl0KihE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o1IbGgxuIjDOTmQlqBmdZHfyYgT5PghUoii5PT+Is4Ck+a2k1Nkyq0TLlLZnwpKF9 B48wrBwuXllU0LqqY7tStv87Dl3rkE/2jfJA5zK+zjbGbe56T4zzFAyLJg2cmbHaNM UW+uqHxKFm6CwbPhYDit5Y5vEbu+8SQtixc+qcpU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chengming Zhou , Shuah Khan , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 5.15 23/25] kselftest/vm: fix tests build with old libc Date: Thu, 17 Mar 2022 13:46:10 +0100 Message-Id: <20220317124526.969165919@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Chengming Zhou [ Upstream commit b773827e361952b3f53ac6fa4c4e39ccd632102e ] The error message when I build vm tests on debian10 (GLIBC 2.28): userfaultfd.c: In function `userfaultfd_pagemap_test': userfaultfd.c:1393:37: error: `MADV_PAGEOUT' undeclared (first use in this function); did you mean `MADV_RANDOM'? if (madvise(area_dst, test_pgsize, MADV_PAGEOUT)) ^~~~~~~~~~~~ MADV_RANDOM This patch includes these newer definitions from UAPI linux/mman.h, is useful to fix tests build on systems without these definitions in glibc sys/mman.h. Link: https://lkml.kernel.org/r/20220227055330.43087-2-zhouchengming@byteda= nce.com Signed-off-by: Chengming Zhou Reviewed-by: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- tools/testing/selftests/vm/userfaultfd.c | 1 + 1 file changed, 1 insertion(+) --- a/tools/testing/selftests/vm/userfaultfd.c +++ b/tools/testing/selftests/vm/userfaultfd.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 504ADC433EF for ; Thu, 17 Mar 2022 12:56:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234361AbiCQM5Z (ORCPT ); Thu, 17 Mar 2022 08:57:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234912AbiCQMyC (ORCPT ); Thu, 17 Mar 2022 08:54:02 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BBE61F1275; Thu, 17 Mar 2022 05:52:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id F3E5FCE2340; Thu, 17 Mar 2022 12:52:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E827EC340E9; Thu, 17 Mar 2022 12:52:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521548; bh=QkUeXwg/Y1IhD7OVg75olzYWzsKm1eyFHMeYal8Sm60=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qj19qYIBYjl0OUk7qquK5SVue+rAZKmLhiToxGDfcej/3Fn5U4wXo/dxdJeSpaikk 6mZpD/OWHYD2vsJVvx0md/Ohg9T9qotHsHdTY0DKvBTZ022uWJxQnoedXsQIhphpNQ JvYXYr05106p0FJJSGY3VjgqFxbsiEJNN6X7Ptvc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Peter Zijlstra (Intel)" , Borislav Petkov , Miroslav Benes Subject: [PATCH 5.15 24/25] x86/module: Fix the paravirt vs alternative order Date: Thu, 17 Mar 2022 13:46:11 +0100 Message-Id: <20220317124526.996500997@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Peter Zijlstra commit 5adf349439d29f92467e864f728dfc23180f3ef9 upstream. Ever since commit 4e6292114c74 ("x86/paravirt: Add new features for paravirt patching") there is an ordering dependency between patching paravirt ops and patching alternatives, the module loader still violates this. Fixes: 4e6292114c74 ("x86/paravirt: Add new features for paravirt patching") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Reviewed-by: Miroslav Benes Cc: Link: https://lore.kernel.org/r/20220303112825.068773913@infradead.org Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- arch/x86/kernel/module.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) --- a/arch/x86/kernel/module.c +++ b/arch/x86/kernel/module.c @@ -270,6 +270,14 @@ int module_finalize(const Elf_Ehdr *hdr, orc_ip =3D s; } =20 + /* + * See alternative_instructions() for the ordering rules between the + * various patching types. + */ + if (para) { + void *pseg =3D (void *)para->sh_addr; + apply_paravirt(pseg, pseg + para->sh_size); + } if (alt) { /* patch .altinstructions */ void *aseg =3D (void *)alt->sh_addr; @@ -283,11 +291,6 @@ int module_finalize(const Elf_Ehdr *hdr, tseg, tseg + text->sh_size); } =20 - if (para) { - void *pseg =3D (void *)para->sh_addr; - apply_paravirt(pseg, pseg + para->sh_size); - } - /* make jump label nops */ jump_label_apply_nops(me); From nobody Mon Jun 22 20:17:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97A83C433EF for ; Thu, 17 Mar 2022 12:56:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234383AbiCQM5V (ORCPT ); Thu, 17 Mar 2022 08:57:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234914AbiCQMyC (ORCPT ); Thu, 17 Mar 2022 08:54:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D26C41F0CB7; Thu, 17 Mar 2022 05:52:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6E2CB614F0; Thu, 17 Mar 2022 12:52:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56D1FC340ED; Thu, 17 Mar 2022 12:52:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521544; bh=BCx64xO3Wbry2wCPfTZARKe6NTiar7S30FYEF5kz4GU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QPDURMUMwy71KDAbVCC7pgGMX+xEoPVjU+RTZVFpqjksuGOWR22k8+pX+bop0q2ZC 1DGmhbsDtaCGR9erSrD0w59sLBOg/EnNF47KvyMkKTuxZeuQpyjDr0I53ZSLvmx5go asaQPH8C62dEuBMZSx7OH1e3kT+TEShNtS4v/tig= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ivan Vecera , Petr Oros , Dave Ertman , Jakub Kicinski Subject: [PATCH 5.15 25/25] ice: Fix race condition during interface enslave Date: Thu, 17 Mar 2022 13:46:12 +0100 Message-Id: <20220317124527.024081334@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.308079100@linuxfoundation.org> References: <20220317124526.308079100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Ivan Vecera commit 5cb1ebdbc4342b1c2ce89516e19808d64417bdbc upstream. Commit 5dbbbd01cbba83 ("ice: Avoid RTNL lock when re-creating auxiliary device") changes a process of re-creation of aux device so ice_plug_aux_dev() is called from ice_service_task() context. This unfortunately opens a race window that can result in dead-lock when interface has left LAG and immediately enters LAG again. Reproducer: ``` #!/bin/sh ip link add lag0 type bond mode 1 miimon 100 ip link set lag0 for n in {1..10}; do echo Cycle: $n ip link set ens7f0 master lag0 sleep 1 ip link set ens7f0 nomaster done ``` This results in: [20976.208697] Workqueue: ice ice_service_task [ice] [20976.213422] Call Trace: [20976.215871] __schedule+0x2d1/0x830 [20976.219364] schedule+0x35/0xa0 [20976.222510] schedule_preempt_disabled+0xa/0x10 [20976.227043] __mutex_lock.isra.7+0x310/0x420 [20976.235071] enum_all_gids_of_dev_cb+0x1c/0x100 [ib_core] [20976.251215] ib_enum_roce_netdev+0xa4/0xe0 [ib_core] [20976.256192] ib_cache_setup_one+0x33/0xa0 [ib_core] [20976.261079] ib_register_device+0x40d/0x580 [ib_core] [20976.266139] irdma_ib_register_device+0x129/0x250 [irdma] [20976.281409] irdma_probe+0x2c1/0x360 [irdma] [20976.285691] auxiliary_bus_probe+0x45/0x70 [20976.289790] really_probe+0x1f2/0x480 [20976.298509] driver_probe_device+0x49/0xc0 [20976.302609] bus_for_each_drv+0x79/0xc0 [20976.306448] __device_attach+0xdc/0x160 [20976.310286] bus_probe_device+0x9d/0xb0 [20976.314128] device_add+0x43c/0x890 [20976.321287] __auxiliary_device_add+0x43/0x60 [20976.325644] ice_plug_aux_dev+0xb2/0x100 [ice] [20976.330109] ice_service_task+0xd0c/0xed0 [ice] [20976.342591] process_one_work+0x1a7/0x360 [20976.350536] worker_thread+0x30/0x390 [20976.358128] kthread+0x10a/0x120 [20976.365547] ret_from_fork+0x1f/0x40 ... [20976.438030] task:ip state:D stack: 0 pid:213658 ppid:213= 627 flags:0x00004084 [20976.446469] Call Trace: [20976.448921] __schedule+0x2d1/0x830 [20976.452414] schedule+0x35/0xa0 [20976.455559] schedule_preempt_disabled+0xa/0x10 [20976.460090] __mutex_lock.isra.7+0x310/0x420 [20976.464364] device_del+0x36/0x3c0 [20976.467772] ice_unplug_aux_dev+0x1a/0x40 [ice] [20976.472313] ice_lag_event_handler+0x2a2/0x520 [ice] [20976.477288] notifier_call_chain+0x47/0x70 [20976.481386] __netdev_upper_dev_link+0x18b/0x280 [20976.489845] bond_enslave+0xe05/0x1790 [bonding] [20976.494475] do_setlink+0x336/0xf50 [20976.502517] __rtnl_newlink+0x529/0x8b0 [20976.543441] rtnl_newlink+0x43/0x60 [20976.546934] rtnetlink_rcv_msg+0x2b1/0x360 [20976.559238] netlink_rcv_skb+0x4c/0x120 [20976.563079] netlink_unicast+0x196/0x230 [20976.567005] netlink_sendmsg+0x204/0x3d0 [20976.570930] sock_sendmsg+0x4c/0x50 [20976.574423] ____sys_sendmsg+0x1eb/0x250 [20976.586807] ___sys_sendmsg+0x7c/0xc0 [20976.606353] __sys_sendmsg+0x57/0xa0 [20976.609930] do_syscall_64+0x5b/0x1a0 [20976.613598] entry_SYSCALL_64_after_hwframe+0x65/0xca 1. Command 'ip link ... set nomaster' causes that ice_plug_aux_dev() is called from ice_service_task() context, aux device is created and associated device->lock is taken. 2. Command 'ip link ... set master...' calls ice's notifier under RTNL lock and that notifier calls ice_unplug_aux_dev(). That function tries to take aux device->lock but this is already taken by ice_plug_aux_dev() in step 1 3. Later ice_plug_aux_dev() tries to take RTNL lock but this is already taken in step 2 4. Dead-lock The patch fixes this issue by following changes: - Bit ICE_FLAG_PLUG_AUX_DEV is kept to be set during ice_plug_aux_dev() call in ice_service_task() - The bit is checked in ice_clear_rdma_cap() and only if it is not set then ice_unplug_aux_dev() is called. If it is set (in other words plugging of aux device was requested and ice_plug_aux_dev() is potentially running) then the function only clears the bit - Once ice_plug_aux_dev() call (in ice_service_task) is finished the bit ICE_FLAG_PLUG_AUX_DEV is cleared but it is also checked whether it was already cleared by ice_clear_rdma_cap(). If so then aux device is unplugged. Signed-off-by: Ivan Vecera Co-developed-by: Petr Oros Signed-off-by: Petr Oros Reviewed-by: Dave Ertman Link: https://lore.kernel.org/r/20220310171641.3863659-1-ivecera@redhat.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Sudip Mukherjee --- drivers/net/ethernet/intel/ice/ice.h | 11 ++++++++++- drivers/net/ethernet/intel/ice/ice_main.c | 12 +++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/intel/ice/ice.h +++ b/drivers/net/ethernet/intel/ice/ice.h @@ -703,7 +703,16 @@ static inline void ice_set_rdma_cap(stru */ static inline void ice_clear_rdma_cap(struct ice_pf *pf) { - ice_unplug_aux_dev(pf); + /* We can directly unplug aux device here only if the flag bit + * ICE_FLAG_PLUG_AUX_DEV is not set because ice_unplug_aux_dev() + * could race with ice_plug_aux_dev() called from + * ice_service_task(). In this case we only clear that bit now and + * aux device will be unplugged later once ice_plug_aux_device() + * called from ice_service_task() finishes (see ice_service_task()). + */ + if (!test_and_clear_bit(ICE_FLAG_PLUG_AUX_DEV, pf->flags)) + ice_unplug_aux_dev(pf); + clear_bit(ICE_FLAG_RDMA_ENA, pf->flags); clear_bit(ICE_FLAG_AUX_ENA, pf->flags); } --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -2143,9 +2143,19 @@ static void ice_service_task(struct work return; } =20 - if (test_and_clear_bit(ICE_FLAG_PLUG_AUX_DEV, pf->flags)) + if (test_bit(ICE_FLAG_PLUG_AUX_DEV, pf->flags)) { + /* Plug aux device per request */ ice_plug_aux_dev(pf); =20 + /* Mark plugging as done but check whether unplug was + * requested during ice_plug_aux_dev() call + * (e.g. from ice_clear_rdma_cap()) and if so then + * plug aux device. + */ + if (!test_and_clear_bit(ICE_FLAG_PLUG_AUX_DEV, pf->flags)) + ice_unplug_aux_dev(pf); + } + if (test_and_clear_bit(ICE_FLAG_MTU_CHANGED, pf->flags)) { struct iidc_event *event;