From nobody Mon Jun 22 20:17:51 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 68818C433F5 for ; Thu, 17 Mar 2022 12:56:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234491AbiCQM52 (ORCPT ); Thu, 17 Mar 2022 08:57:28 -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 S234916AbiCQMyD (ORCPT ); Thu, 17 Mar 2022 08:54:03 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72CCA1F160C; Thu, 17 Mar 2022 05:52: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 ams.source.kernel.org (Postfix) with ESMTPS id 2723CB81E01; Thu, 17 Mar 2022 12:52:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4334AC340E9; Thu, 17 Mar 2022 12:52:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521551; bh=wmCh4MRMcjf729jX9PRCsafTDB+T+FBR5jtLw0d/9nw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ci3p0/RYIcUlwB1Xsqb9Gy2DnK9gvuff0mtXosGW1A7OgE67FBCZO0HTek7g18CCb 8gyH/J6TU7xnzHuRJoMOckRFXHmTiu1slV6595oKsxE9eCr2QU0bFumD0Zf5c6oyMC +47Kf8gzxni3VnxWRkFbBEgBXtoWa+Z7UD/NxOFU= 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.16 01/28] Revert "xfrm: state and policy should fail if XFRMA_IF_ID 0" Date: Thu, 17 Mar 2022 13:45:52 +0100 Message-Id: <20220317124526.811599861@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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:51 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 5D8B4C433EF for ; Thu, 17 Mar 2022 12:58:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234856AbiCQM6W (ORCPT ); Thu, 17 Mar 2022 08:58:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235051AbiCQMyb (ORCPT ); Thu, 17 Mar 2022 08:54:31 -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 755A83B00E; Thu, 17 Mar 2022 05:53:15 -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 1BE20B81E5C; Thu, 17 Mar 2022 12:53:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D9D6C340ED; Thu, 17 Mar 2022 12:53:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521592; bh=j1bNvp8+7Dxv3PwhV/qjUZjvW3kzu3o9Fl0oVcTEDKA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BMyGKRREKbFX71SoEskw3R9dSrBjhPpRlCt8E1Semmf77szEtmDRoCTFFT97hv0l0 pn1dM5RHiaLR54f0frc2h3BFlT+34srMhDO2WO+t6fQaVEAUh0fqWgNGiG1itLfhSu 5WgRpvUxjow8hBDMKb9jpFaNtdyXYCUW5R68X0zo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Frank Wunderlich , Heiko Stuebner , Sasha Levin Subject: [PATCH 5.16 02/28] arm64: dts: rockchip: fix dma-controller node names on rk356x Date: Thu, 17 Mar 2022 13:45:53 +0100 Message-Id: <20220317124526.839790483@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Frank Wunderlich [ Upstream commit 2ddd96aadbd0412040ef49eda94549c32de6c92c ] DMA-Cotrollers defined in rk356x.dtsi do not match the pattern in bindings. arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dt.yaml: dmac@fe530000: $nodename:0: 'dmac@fe530000' does not match '^dma-controll= er(@.*)?$' From schema: Documentation/devicetree/bindings/dma/arm,pl330.yaml arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dt.yaml: dmac@fe550000: $nodename:0: 'dmac@fe550000' does not match '^dma-controll= er(@.*)?$' From schema: Documentation/devicetree/bindings/dma/arm,pl330.yaml This Patch fixes it. Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20220123133615.135789-1-linux@fw-web.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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts= /rockchip/rk356x.dtsi index 46d9552f6028..688e3585525a 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi @@ -647,7 +647,7 @@ status =3D "disabled"; }; =20 - dmac0: dmac@fe530000 { + dmac0: dma-controller@fe530000 { compatible =3D "arm,pl330", "arm,primecell"; reg =3D <0x0 0xfe530000 0x0 0x4000>; interrupts =3D , @@ -658,7 +658,7 @@ #dma-cells =3D <1>; }; =20 - dmac1: dmac@fe550000 { + dmac1: dma-controller@fe550000 { compatible =3D "arm,pl330", "arm,primecell"; reg =3D <0x0 0xfe550000 0x0 0x4000>; interrupts =3D , --=20 2.34.1 From nobody Mon Jun 22 20:17:51 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 50554C433EF for ; Thu, 17 Mar 2022 12:58:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235564AbiCQM7P (ORCPT ); Thu, 17 Mar 2022 08:59:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234233AbiCQMzf (ORCPT ); Thu, 17 Mar 2022 08:55:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A24879F3BD; Thu, 17 Mar 2022 05:53:54 -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 2ED5C61584; Thu, 17 Mar 2022 12:53:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37187C340F3; Thu, 17 Mar 2022 12:53:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521633; bh=WB/A9z0bllwl5fTK4cuQmxEQkRdoAy5zWdRVr5axPS4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bo1vnoUo3gL405reGq15VEhZ0aDMKERl28d2cA1IxrhG18McIcC0JGpnL8dF1xs5t KJoIKOd1MClB6YQ/vqfJRzBlfZSHw2cxCso4NrXU0GZNTbEGYx7SP6i1Drz3T4CBPQ UwixKnIWbVAHruprvOv0ijUQEyClXLxAZcWi56b0= 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.16 03/28] arm64: dts: rockchip: fix rk3399-puma-haikou USB OTG mode Date: Thu, 17 Mar 2022 13:45:54 +0100 Message-Id: <20220317124526.868575839@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- .../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:51 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 BE5DCC43217 for ; Thu, 17 Mar 2022 12:58:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234291AbiCQM7W (ORCPT ); Thu, 17 Mar 2022 08:59:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234290AbiCQMzu (ORCPT ); Thu, 17 Mar 2022 08:55:50 -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 F0688A94E2; Thu, 17 Mar 2022 05:54: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 EB375B81DA1; Thu, 17 Mar 2022 12:53:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB8FCC340E9; Thu, 17 Mar 2022 12:53:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521637; bh=oGJyW9VB8SVJrrMO0vttarNjtv3xd82FZtlB3Ii/tZE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=189SxMmauxQ+8b69e8lIeX6XGcRH5O794dG7YNao1X9JmbHtf36SQyKvcnCvu0F05 pe9Y5G1XUvf5AFLbRzN4TSU7iuhelc/R5H8IBQqU9j4WnQf/n2dKD2DwrCG4qV7iIA IZaQ7gUZiOk9VcRR59dD87XMQh0DJ+K1zDwELGOA= 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.16 04/28] xfrm: Check if_id in xfrm_migrate Date: Thu, 17 Mar 2022 13:45:55 +0100 Message-Id: <20220317124526.896673291@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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 4924b9135c6e..fbc0b2798184 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -4257,7 +4257,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; @@ -4266,7 +4266,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; @@ -4278,7 +4279,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; @@ -4394,7 +4396,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; @@ -4413,14 +4415,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 17f0623c4508..a8c142bd1263 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:51 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 601BCC43219 for ; Thu, 17 Mar 2022 12:58:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234903AbiCQM7T (ORCPT ); Thu, 17 Mar 2022 08:59:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234291AbiCQMzu (ORCPT ); Thu, 17 Mar 2022 08:55:50 -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 E690F89CD4; Thu, 17 Mar 2022 05:54: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 dfw.source.kernel.org (Postfix) with ESMTPS id 845536157E; Thu, 17 Mar 2022 12:54:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F616C340E9; Thu, 17 Mar 2022 12:54:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521641; bh=UqwiPp2qBmb+7tKFdE0+ShqjTMU9taITEwrPGtd63H8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=afY+Dh0VsuyHlfu8zLpRaa6buSPry/Vcw2cOpRe/wlx24HicJOv7+L+JjjZz8k16C WQ3hYlrf21CCuCzdrRqPp8NGkTyOdr8E1BLfrFYRv2Od9dpil0aT25RoV8gLjhEc45 dRH9VULtzdxcFLKeAyo1aJBw2sNe+jgBvwpNRCFI= 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.16 05/28] xfrm: Fix xfrm migrate issues when address family changes Date: Thu, 17 Mar 2022 13:45:56 +0100 Message-Id: <20220317124526.925337900@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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:51 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 222B0C433EF for ; Thu, 17 Mar 2022 12:58:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234453AbiCQM7a (ORCPT ); Thu, 17 Mar 2022 08:59:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234335AbiCQMz7 (ORCPT ); Thu, 17 Mar 2022 08:55:59 -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 70C72BB920; Thu, 17 Mar 2022 05:54: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 0FE56614F0; Thu, 17 Mar 2022 12:54:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02807C340EF; Thu, 17 Mar 2022 12:54:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521644; bh=DPdfF6q9H15BXcu0xyHzF22kFQv23DsT8xa/YMq2E1I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S05oLSeXKc3hOfghWJtg+hbBpaQ6c9Nb4bB23q5baJfHdGMuQZZ7vy8+qW5KVM3La oz/BBKqnOXmiVdSqJJ+pEle0PzgfZ+/EXMzka654i6oxCWFH2Y/h9FVMWyAAAsJGal N89kd8zJljBvM25F2fnFKyxCTS2qnLRWKja4U24k= 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.16 06/28] arm64: dts: rockchip: fix rk3399-puma eMMC HS400 signal integrity Date: Thu, 17 Mar 2022 13:45:57 +0100 Message-Id: <20220317124526.953096814@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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:51 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 A1030C433EF for ; Thu, 17 Mar 2022 12:58:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234327AbiCQM7f (ORCPT ); Thu, 17 Mar 2022 08:59:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234272AbiCQM4C (ORCPT ); Thu, 17 Mar 2022 08:56:02 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5465DDAFD0; Thu, 17 Mar 2022 05:54:12 -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 D822BB81E8F; Thu, 17 Mar 2022 12:54:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0115AC340E9; Thu, 17 Mar 2022 12:54:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521649; bh=uhdsoUxxt7mQ3PMpzNkAu4PksDbXgWyjX6865DxB0aM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wpnZT4lPkjhHpa9X7lHp96GIPA6Bx4kAOj6Zi32MkEaoudp3StG/UCzywZxTjkvYC Q37K0ypN81cp1VmcRiAbXLTic/YshKLGowjr8PoK1HyMpAfAzz6C/QF63VDOKcsFe5 ZnBgrHhDzFIZP4hm36t/729gmn2N0x3codFcbFkQ= 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.16 07/28] arm64: dts: rockchip: align pl330 node name with dtschema Date: Thu, 17 Mar 2022 13:45:58 +0100 Message-Id: <20220317124526.980463534@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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 00f50b05d55a..b72874c16a71 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 39db0b85b4da..b822533dc7f1 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:51 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 7AB6FC433F5 for ; Thu, 17 Mar 2022 12:58:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234406AbiCQM7k (ORCPT ); Thu, 17 Mar 2022 08:59:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234369AbiCQM4C (ORCPT ); Thu, 17 Mar 2022 08:56:02 -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 A122AE09AA; Thu, 17 Mar 2022 05:54:15 -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 44659B81E5C; Thu, 17 Mar 2022 12:54:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70612C340E9; Thu, 17 Mar 2022 12:54:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521652; bh=U1AYK4YV0r9iSizOTGyRCkA+/mxGTeFvDJoeQhPsjh0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eWFFfHavvkFGybHzYKOgHGYu0SBiGreqe4Q8RgkSzhCXAKxlC+O7UqjW7LHcY/n9P zFJY6oXMaktjboNdqSCy9QcoVBqrXg7SrmCyBWKffMiEfalfd+Dzb2trfSbH6j5ZiZ aloSOMnILebBVN+7Wn9qlLtwgTToEZtXZVPDUHZk= 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.16 08/28] arm64: dts: rockchip: reorder rk3399 hdmi clocks Date: Thu, 17 Mar 2022 13:45:59 +0100 Message-Id: <20220317124527.008379007@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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 d3cdf6f42a30..080457a68e3c 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi @@ -1881,10 +1881,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:51 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 63AEEC433F5 for ; Thu, 17 Mar 2022 12:58:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234193AbiCQM7s (ORCPT ); Thu, 17 Mar 2022 08:59:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234371AbiCQM4C (ORCPT ); Thu, 17 Mar 2022 08:56:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AFD2E6C43; Thu, 17 Mar 2022 05:54:17 -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 1612C6157E; Thu, 17 Mar 2022 12:54:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A364C340E9; Thu, 17 Mar 2022 12:54:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521656; bh=ZfN1xncFxQf811d6fskGB28xJbXGUg/Vxmh4O5Hkydc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mlmF19uT/nwPBdx2YSVfpHjKlWGQCBowUzz9/3pZsQFpGV2YhibgxshxFXsnnLlwU daqOGuxhASuiitY84efbUfxOSWRUWSuuSRuoo0+CKM7OCF2vY/0xVYb0MryGe4o9U6 GoxyOfrJqiN2bLpv6TXhDgLdXAzDp17l5gfvzP2A= 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.16 09/28] arm64: dts: agilex: use the compatible "intel,socfpga-agilex-hsotg" Date: Thu, 17 Mar 2022 13:46:00 +0100 Message-Id: <20220317124527.035775085@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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 0dd2d2ee765a..f4270cf18996 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:51 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 565C8C433F5 for ; Thu, 17 Mar 2022 12:56:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234345AbiCQM5Q (ORCPT ); Thu, 17 Mar 2022 08:57:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234917AbiCQMyD (ORCPT ); Thu, 17 Mar 2022 08:54:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD2F91F1613; Thu, 17 Mar 2022 05:52:37 -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 76C16614F0; Thu, 17 Mar 2022 12:52:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C8EDC340E9; Thu, 17 Mar 2022 12:52:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521556; bh=90WLKe+ICTMTgb7QBJQdv7Tp3vRHvzNNvaeLMeuUQpU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bZ4HtDEx90xKkW/NSy3ZcFw9LklzMlQv9m16xI+d+taWLWiscP0W9mFvRRxsEM387 jtnKoEG/kFhLB56GB8qXtUqTBwgGaizb1EPckAHD60sH1pltTnv6qFyBnN+cS8fRT9 Awm//FCvVDitT0kgsTTb/FlOJ9jrPHW1zkmM1jTs= 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.16 10/28] ARM: dts: rockchip: reorder rk322x hmdi clocks Date: Thu, 17 Mar 2022 13:46:01 +0100 Message-Id: <20220317124527.062853116@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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 8eed9e3a92e9..5868eb512f69 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:51 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 B53CFC433F5 for ; Thu, 17 Mar 2022 12:56:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234340AbiCQM5b (ORCPT ); Thu, 17 Mar 2022 08:57:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234918AbiCQMyD (ORCPT ); Thu, 17 Mar 2022 08:54:03 -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 C3A561F1610; Thu, 17 Mar 2022 05:52:42 -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 7F864B81DA1; Thu, 17 Mar 2022 12:52:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1368C340F2; Thu, 17 Mar 2022 12:52:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521560; bh=c/vJSC7ZZC7rjUnp54uJ2Qsy/5gm9rzvDqpR8TxQZkw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AXtNRbHqg4aQJmTJ1DXw0UER3CoZBrbQ48wrJJGdGJwsg0RdsEAZeKXrc2lNjXcNW H5xem5NM079ZKhWIcsRwL12fpDGRTM9PRMUpWqJCPbjuD0tWipQCuOGAXYeUavPQDG AaS1wrtEm1zL26Hdst7uKlKZplM4FXbWd7QBKR0s= 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.16 11/28] ARM: dts: rockchip: fix a typo on rk3288 crypto-controller Date: Thu, 17 Mar 2022 13:46:02 +0100 Message-Id: <20220317124527.090400343@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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 aaaa61875701..45a9d9b908d2 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:51 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 99C72C433EF for ; Thu, 17 Mar 2022 12:56:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234497AbiCQM5e (ORCPT ); Thu, 17 Mar 2022 08:57:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234920AbiCQMyD (ORCPT ); Thu, 17 Mar 2022 08:54:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E39F1F1619; Thu, 17 Mar 2022 05:52: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 dfw.source.kernel.org (Postfix) with ESMTPS id 38413614FF; Thu, 17 Mar 2022 12:52:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2BAA3C340E9; Thu, 17 Mar 2022 12:52:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521563; bh=zRZO4C73CEe0cGTlpqWmGRS66SbFnS+B8DijLjV/NHc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aScqgrCZMgPHqgH8Mb9HLjnKlFQBURQcSapEiM04pjsA/ofi4nDa4LzikT9U3OcJQ mlFuxiZVXaTxQ1ftL4CeePRbMJHCvyamneqAs1XOyozLdBRYrHofpjlTX+QrLjmx9I OrTijIXtSUUvDkFyvsgd3hRq7W1oFv5dbnQnETPw= 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.16 12/28] mac80211: refuse aggregations sessions before authorized Date: Thu, 17 Mar 2022 13:46:03 +0100 Message-Id: <20220317124527.118540315@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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:51 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 A51C8C433EF for ; Thu, 17 Mar 2022 12:56:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234392AbiCQM5k (ORCPT ); Thu, 17 Mar 2022 08:57:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234922AbiCQMyE (ORCPT ); Thu, 17 Mar 2022 08:54:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A0D51F125F; Thu, 17 Mar 2022 05:52: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 A7FD961578; Thu, 17 Mar 2022 12:52:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AFAA5C340E9; Thu, 17 Mar 2022 12:52:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521567; bh=sy3aP4fnh8SyAGLvHPsjL4Mx6PXZBmUBSdow+IfmEWg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dqPXuN9yMjGSWYRC0U4b83vGUwtgXqlWBli7esJaV+DfIM6f4oFP/Bl7L7sQ/KQVO eQul7Jff5PA/aC/T1ggF34fY2OavoEM3WvGSyHUxBmUo4Lp2JaSIepyWooOQ9hJqUt mN+3HWy1NoWL0k8q8bIgubpUavpXnHqFY6/Taa98= 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.16 13/28] MIPS: smp: fill in sibling and core maps earlier Date: Thu, 17 Mar 2022 13:46:04 +0100 Message-Id: <20220317124527.146347831@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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:51 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 12906C433EF for ; Thu, 17 Mar 2022 12:58:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235479AbiCQM7D (ORCPT ); Thu, 17 Mar 2022 08:59:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234938AbiCQMyJ (ORCPT ); Thu, 17 Mar 2022 08:54:09 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02817399; Thu, 17 Mar 2022 05:52:53 -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 B0834B81E01; Thu, 17 Mar 2022 12:52:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBE05C340E9; Thu, 17 Mar 2022 12:52:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521570; bh=qyUSrm97P+ZfSNFz2/ZXRa42gbGKX1WKDF/8LJIGHEg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fnfoUsIACdV+0LmgLbz1osSFDSaRqvvtMy0vVv0zhpNq7CiLliVPQa/CgYcdO7X30 GvMwsf4PREUBuPuVG6HD4LzEzR8lsmP8hCZr6YCzTWS8EGeJr0PYaPNzLGJif1Aylt dAPdZGQMRy6d+PMT0EO8tfToVbNhI5i7lS6tDcWQ= 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.16 14/28] ARM: 9178/1: fix unmet dependency on BITREVERSE for HAVE_ARCH_BITREVERSE Date: Thu, 17 Mar 2022 13:46:05 +0100 Message-Id: <20220317124527.173456091@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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:51 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 6B157C433FE for ; Thu, 17 Mar 2022 12:58:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234591AbiCQM5w (ORCPT ); Thu, 17 Mar 2022 08:57:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234980AbiCQMyQ (ORCPT ); Thu, 17 Mar 2022 08:54:16 -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 4A4E884ED7; Thu, 17 Mar 2022 05:52:57 -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 B79EACE2340; Thu, 17 Mar 2022 12:52:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88EEFC340E9; Thu, 17 Mar 2022 12:52:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521574; bh=94Eezw0rkaghiNp0XtbPiQ+zQlAXCbVMeFdXKfkMh5s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kfcuWKulK/k7zppHtfWWgVbplKFllYL1wLJnZH2Eb4eRfd0io5K8tdW1gnZM5FjTp sf43wxmAUPEBV1e5iZnvgMXNr3bDUsxPPS8j11jjlnunZYpYe7uj2ZV4+JzMvtfTpb 7/ZsCanMteiHq8qXgJXkfg5Q8TPW+Qv7CklLkaq8= 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.16 15/28] Bluetooth: hci_core: Fix leaking sent_cmd skb Date: Thu, 17 Mar 2022 13:46:06 +0100 Message-Id: <20220317124527.200558031@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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 6c00ce302f09..1c8fb27b155a 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -3969,6 +3969,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:51 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 1C8D1C433F5 for ; Thu, 17 Mar 2022 12:58:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234643AbiCQM55 (ORCPT ); Thu, 17 Mar 2022 08:57:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234992AbiCQMyT (ORCPT ); Thu, 17 Mar 2022 08:54:19 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E3751EC6D; Thu, 17 Mar 2022 05:53:02 -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 E8411CE2336; Thu, 17 Mar 2022 12:53:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF22EC340E9; Thu, 17 Mar 2022 12:52:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521579; bh=5nw7cHt/RTx/pOOhvfo54s8PdS6J/svkQh4QT7q+nsg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=US2BZAN8vnwgRJkm5XzPOF2+nF6G6J5r/JRz2bpWaqEq+4A3No8GkR1LUBNO1qZ1O excL/iDH1LfLMERMAzjbHX8licbd/xMWjqUSQBdUu0Mwd/Tu1Q0peofTcEoXUwmyAH Q7b+bCbqjZVkXbWjIdZuah+y0/jJPlK4hXFYByts= 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.16 16/28] can: rcar_canfd: rcar_canfd_channel_probe(): register the CAN device when fully ready Date: Thu, 17 Mar 2022 13:46:07 +0100 Message-Id: <20220317124527.228586235@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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 137eea4c7bad..4871428859fd 100644 --- a/drivers/net/can/rcar/rcar_canfd.c +++ b/drivers/net/can/rcar/rcar_canfd.c @@ -1716,15 +1716,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:51 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 7A0B7C4332F for ; Thu, 17 Mar 2022 12:58:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234717AbiCQM6C (ORCPT ); Thu, 17 Mar 2022 08:58:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235009AbiCQMyW (ORCPT ); Thu, 17 Mar 2022 08:54:22 -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 06A2E1EC6D; Thu, 17 Mar 2022 05:53:06 -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 B1ED1B81EA1; Thu, 17 Mar 2022 12:53:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E07B4C340EF; Thu, 17 Mar 2022 12:53:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521583; bh=18sop7HHeHWk2N9tOaxxTwb116X8umHAw2ytwpnKPGs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=drG51cAQl90S4sVSm8IfQ7O4JoI4GFU7JebjNl9qNLGm/GCxMFPMvWsiJx5ZNb8Cm r73AbRiZG0TLVdx8Qe5njgyJJ3BJ7h1aryWo0waIKYGA/WEdCQTKLvAhnmcNeokV17 2pqpM4wiICNv7xSrpNkcgqmz+1jgHqPS3ivEwFSE= 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.16 17/28] atm: firestream: check the return value of ioremap() in fs_init() Date: Thu, 17 Mar 2022 13:46:08 +0100 Message-Id: <20220317124527.257269422@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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:51 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 333A5C433FE for ; Thu, 17 Mar 2022 12:58:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234770AbiCQM6G (ORCPT ); Thu, 17 Mar 2022 08:58:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235016AbiCQMyX (ORCPT ); Thu, 17 Mar 2022 08:54: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 B94FB1EC6D; Thu, 17 Mar 2022 05:53:07 -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 57B1E61578; Thu, 17 Mar 2022 12:53:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34AE9C340E9; Thu, 17 Mar 2022 12:53:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521586; bh=yv24BEIQB2Wa9G21wq5trSJnLc3FQVzB/HOeXIspnWk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GCWssIRfFt7sPSBBx3n8wRbQtkSr84RgCLDw1ijymaxg6AxsVAurp9TYLoczn29bS DhAwupciTm+SxqJp3yK9llc5pvSM61TFNkS80HLyUGg2BhANZV5DwrB1tg7LevIOeu itNTrQLjOfDSItVkL3buf/D4bc1Xng3ijuuRH8js= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , Florian Westphal , Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 5.16 18/28] netfilter: egress: silence egress hook lockdep splats Date: Thu, 17 Mar 2022 13:46:09 +0100 Message-Id: <20220317124527.285482124@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Florian Westphal [ Upstream commit 17a8f31bba7bac8cce4bd12bab50697da96e7710 ] Netfilter assumes its called with rcu_read_lock held, but in egress hook case it may be called with BH readlock. This triggers lockdep splat. In order to avoid to change all rcu_dereference() to rcu_dereference_check(..., rcu_read_lock_bh_held()), wrap nf_hook_slow with read lock/unlock pair. Reported-by: Eric Dumazet Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- include/linux/netfilter_netdev.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/netfilter_netdev.h b/include/linux/netfilter_net= dev.h index b4dd96e4dc8d..e6487a691136 100644 --- a/include/linux/netfilter_netdev.h +++ b/include/linux/netfilter_netdev.h @@ -101,7 +101,11 @@ static inline struct sk_buff *nf_hook_egress(struct sk= _buff *skb, int *rc, nf_hook_state_init(&state, NF_NETDEV_EGRESS, NFPROTO_NETDEV, dev, NULL, NULL, dev_net(dev), NULL); + + /* nf assumes rcu_read_lock, not just read_lock_bh */ + rcu_read_lock(); ret =3D nf_hook_slow(skb, &state, e, 0); + rcu_read_unlock(); =20 if (ret =3D=3D 1) { return skb; --=20 2.34.1 From nobody Mon Jun 22 20:17:51 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 52E96C433EF for ; Thu, 17 Mar 2022 12:58:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234827AbiCQM6J (ORCPT ); Thu, 17 Mar 2022 08:58:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235032AbiCQMy3 (ORCPT ); Thu, 17 Mar 2022 08:54:29 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FDCB1EC6D; Thu, 17 Mar 2022 05:53:12 -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 E74B2B81E5C; Thu, 17 Mar 2022 12:53:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5026AC340E9; Thu, 17 Mar 2022 12:53:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521589; bh=OHgK3l61XigknepnxkAHN1zj8F8/Ze2Ht/Z9K6dhxxQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K1+KA7QMXq9T7Sn/HVR87ME0zcnmfvzxKRWDY6kVkT+5eHXw5/TKGIR2Fkejrhchb h85SDsWaIx7Uomm5/35UPgOpW9FrdclTmGhyv6nZNUhOpEsp19PSc+72fk7Snsd/Ov qqp8SRiYzdy6mNsSqQY2cec2gjBmPQJ/1XSwS3aU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , Dmitry Torokhov , Sasha Levin Subject: [PATCH 5.16 19/28] Input: goodix - use the new soc_intel_is_byt() helper Date: Thu, 17 Mar 2022 13:46:10 +0100 Message-Id: <20220317124527.312793322@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Hans de Goede [ Upstream commit d176708ffc20332d1c730098d2b111e0b77ece82 ] Use the new soc_intel_is_byt() helper from linux/platform_data/x86/soc.h. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20220131143539.109142-5-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- drivers/input/touchscreen/goodix.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen= /goodix.c index aaa3c455e01e..e053aadea3c9 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -686,21 +687,6 @@ static int goodix_reset(struct goodix_ts_data *ts) } =20 #ifdef ACPI_GPIO_SUPPORT -#include -#include - -static const struct x86_cpu_id baytrail_cpu_ids[] =3D { - { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_SILVERMONT, X86_FEATURE_ANY, }, - {} -}; - -static inline bool is_byt(void) -{ - const struct x86_cpu_id *id =3D x86_match_cpu(baytrail_cpu_ids); - - return !!id; -} - static const struct acpi_gpio_params first_gpio =3D { 0, 0, false }; static const struct acpi_gpio_params second_gpio =3D { 1, 0, false }; =20 @@ -784,7 +770,7 @@ static int goodix_add_acpi_gpio_mappings(struct goodix_= ts_data *ts) dev_info(dev, "Using ACPI INTI and INTO methods for IRQ pin access\n"); ts->irq_pin_access_method =3D IRQ_PIN_ACCESS_ACPI_METHOD; gpio_mapping =3D acpi_goodix_reset_only_gpios; - } else if (is_byt() && ts->gpio_count =3D=3D 2 && ts->gpio_int_idx =3D=3D= -1) { + } else if (soc_intel_is_byt() && ts->gpio_count =3D=3D 2 && ts->gpio_int_= idx =3D=3D -1) { dev_info(dev, "No ACPI GpioInt resource, assuming that the GPIO order is= reset, int\n"); ts->irq_pin_access_method =3D IRQ_PIN_ACCESS_ACPI_GPIO; gpio_mapping =3D acpi_goodix_int_last_gpios; --=20 2.34.1 From nobody Mon Jun 22 20:17:51 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 6936FC4332F for ; Thu, 17 Mar 2022 12:58:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234919AbiCQM6Z (ORCPT ); Thu, 17 Mar 2022 08:58:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235077AbiCQMyg (ORCPT ); Thu, 17 Mar 2022 08:54:36 -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 80E7F1EC6D; Thu, 17 Mar 2022 05:53: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 ams.source.kernel.org (Postfix) with ESMTPS id 12589B81E01; Thu, 17 Mar 2022 12:53:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F7CFC340E9; Thu, 17 Mar 2022 12:53:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521596; bh=o0lMoPtysunsKgbgzC3/md5VDCnp60LnkLkLaYxOo7Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PhCdYRiaFoO62mHZDi89+lb6MUdKzVOzgTJF3noBDp0NwrqJD9M+xN4S5qrrsUKuq W+k+qdiuj5jzX3/lScrrcI46SmUq6Bk5aUpJ7epHozDL1N1eHDPgva1Od8FQL1OfOi 6w+CRbzRN9sscfz3H5HqDfFdFZqF9E6EA2+5Rbcg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , Dmitry Torokhov , Sasha Levin Subject: [PATCH 5.16 20/28] Input: goodix - workaround Cherry Trail devices with a bogus ACPI Interrupt() resource Date: Thu, 17 Mar 2022 13:46:11 +0100 Message-Id: <20220317124527.340395229@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Hans de Goede [ Upstream commit d982992669733dd75520000c6057d8ee0725a363 ] ACPI/x86 devices with a Cherry Trail SoC should have a GpioInt + a regular GPIO ACPI resource in their ACPI tables. Some CHT devices have a bug, where the also is bogus interrupt resource (likely copied from a previous Bay Trail based generation of the device). The i2c-core-acpi code will assign the bogus, non-working, interrupt resource to client->irq. Add a workaround to fix this up. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=3D2043960 Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20220228111613.363336-1-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Fox Chen Tested-by: Guenter Roeck Tested-by: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- drivers/input/touchscreen/goodix.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen= /goodix.c index e053aadea3c9..d3136842b717 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -745,7 +745,7 @@ static int goodix_add_acpi_gpio_mappings(struct goodix_= ts_data *ts) const struct acpi_gpio_mapping *gpio_mapping =3D NULL; struct device *dev =3D &ts->client->dev; LIST_HEAD(resources); - int ret; + int irq, ret; =20 ts->gpio_count =3D 0; ts->gpio_int_idx =3D -1; @@ -758,6 +758,20 @@ static int goodix_add_acpi_gpio_mappings(struct goodix= _ts_data *ts) =20 acpi_dev_free_resource_list(&resources); =20 + /* + * CHT devices should have a GpioInt + a regular GPIO ACPI resource. + * Some CHT devices have a bug (where the also is bogus Interrupt + * resource copied from a previous BYT based generation). i2c-core-acpi + * will use the non-working Interrupt resource, fix this up. + */ + if (soc_intel_is_cht() && ts->gpio_count =3D=3D 2 && ts->gpio_int_idx != =3D -1) { + irq =3D acpi_dev_gpio_irq_get(ACPI_COMPANION(dev), 0); + if (irq > 0 && irq !=3D ts->client->irq) { + dev_warn(dev, "Overriding IRQ %d -> %d\n", ts->client->irq, irq); + ts->client->irq =3D irq; + } + } + if (ts->gpio_count =3D=3D 2 && ts->gpio_int_idx =3D=3D 0) { ts->irq_pin_access_method =3D IRQ_PIN_ACCESS_ACPI_GPIO; gpio_mapping =3D acpi_goodix_int_first_gpios; --=20 2.34.1 From nobody Mon Jun 22 20:17:51 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 78E59C43219 for ; Thu, 17 Mar 2022 12:58:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234963AbiCQM6b (ORCPT ); Thu, 17 Mar 2022 08:58:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235092AbiCQMyk (ORCPT ); Thu, 17 Mar 2022 08:54:40 -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 EAAD41EC6D; Thu, 17 Mar 2022 05:53:23 -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 8438A614F0; Thu, 17 Mar 2022 12:53:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C30A5C340E9; Thu, 17 Mar 2022 12:53:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521602; bh=88f2Inyp4nMPXG1F0eSXddJ2jr5Uf6R8ttDLN4ddLcA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N9hs0V4labmMcPQTNaqF9y4QwZHtuqkrCDFLCYy1T+h936r/yChA0zAKHX6BjYqme ww3ySde/4kUL/VU1OH1du3hBcxViE5ZaJCdA9bbFCdxTOwNM1EP5cc74EXWcN28ZtC 99ITClBSjFMND7Z9sLGj2/oVffqSwB0/SLkHZ0IY= 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.16 21/28] iwlwifi: dont advertise TWT support Date: Thu, 17 Mar 2022 13:46:12 +0100 Message-Id: <20220317124527.368108305@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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 f470f9aea50f..c97798f6290a 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c @@ -552,8 +552,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 cde3d2ce0b85..a65024fc96dd 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -223,7 +223,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:51 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 72E1FC433FE for ; Thu, 17 Mar 2022 12:58:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235006AbiCQM6f (ORCPT ); Thu, 17 Mar 2022 08:58:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235112AbiCQMyn (ORCPT ); Thu, 17 Mar 2022 08:54:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F05B1EC6D; Thu, 17 Mar 2022 05:53:27 -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 0903D614FF; Thu, 17 Mar 2022 12:53:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E75EDC340E9; Thu, 17 Mar 2022 12:53:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521606; bh=pnnLmjgrFj3YqWEw384JKVp/R+b1txHwuHbbSAYmroM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LbU6c0Cytrvfq9O9yyOsjUbGb0m4345e/GN8/XbJM/DSkm91k0rCJM/6Oi0B9rLz/ hhQVpmFdkyIKmpVyFU8uklrKtLA+P8wO41pvZBRMMnf1OmtZ7eznEFx/ITNyrUf5jQ vpHc0NHu/CJzusZH+V+xle41xtYcTLYG9qFvu7GU= 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.16 22/28] drm/vrr: Set VRR capable prop only if it is attached to connector Date: Thu, 17 Mar 2022 13:46:13 +0100 Message-Id: <20220317124527.396397346@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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 52e20c68813b..6ae26e7d3dec 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -2275,6 +2275,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:51 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 92229C433F5 for ; Thu, 17 Mar 2022 12:58:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235066AbiCQM6h (ORCPT ); Thu, 17 Mar 2022 08:58:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235142AbiCQMyr (ORCPT ); Thu, 17 Mar 2022 08:54:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C7B03B00E; Thu, 17 Mar 2022 05:53: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 dfw.source.kernel.org (Postfix) with ESMTPS id DB68C61240; Thu, 17 Mar 2022 12:53:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2CCCC340E9; Thu, 17 Mar 2022 12:53:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521610; bh=1n0/fjh8481R1/+vVkCK08P+a7iR+AerTmZh2YvhAQw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OHI6tfLyxZ2/yge8yuppsTeOLTrfYN0KMZFH7sx13nMDxrXM29e8fzoD0aPbrdjJY 7y/jac5mW7fbQJdKcZ4rFzTVFHheb4HIwuV0GFveQ5ky/I7CiRL6mWMpIoxg3E+Yh7 kOlCrqJqi0sJJ7XBK8PnsZd26frKMDROOo1QzwuE= 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.16 23/28] nl80211: Update bss channel on channel switch for P2P_CLIENT Date: Thu, 17 Mar 2022 13:46:14 +0100 Message-Id: <20220317124527.424056121@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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 f73251828782..9b4bb1460cef 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -17757,7 +17757,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:51 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 C4101C4332F for ; Thu, 17 Mar 2022 12:58:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235101AbiCQM6i (ORCPT ); Thu, 17 Mar 2022 08:58:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235175AbiCQMyx (ORCPT ); Thu, 17 Mar 2022 08:54:53 -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 7492C3B00E; Thu, 17 Mar 2022 05:53:36 -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 25EEBB81E01; Thu, 17 Mar 2022 12:53:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B37DC340E9; Thu, 17 Mar 2022 12:53:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521613; bh=qz2/+MsYFE+k4rvs9wvf9F2qqKY54LYjp3wUAUnPR30=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CAzXeipZFIssifCGOpzJRlGT6cx41shRv2b9T52ldKpbOZOp7lOmsStorEYuSQDlv RFkZfy/0tNNp9lPK59kKrlzcNbXeRgfj6py4yELgjbHakVug1EyMClf2HAnkkNwbCU UauUtjTIMNhA5kZRiLpsVUNbVc+Sz6Qr319T3GoM= 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.16 24/28] tcp: make tcp_read_sock() more robust Date: Thu, 17 Mar 2022 13:46:15 +0100 Message-Id: <20220317124527.451252102@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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 28abb0bb1c51..38f936785179 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -1653,11 +1653,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:51 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 884B0C43217 for ; Thu, 17 Mar 2022 12:58:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235140AbiCQM6l (ORCPT ); Thu, 17 Mar 2022 08:58:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235193AbiCQMy4 (ORCPT ); Thu, 17 Mar 2022 08:54:56 -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 F04C23B00E; Thu, 17 Mar 2022 05:53: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 AD2BCB81E8F; Thu, 17 Mar 2022 12:53:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6F08C340E9; Thu, 17 Mar 2022 12:53:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521617; bh=OQdhJ2GZ5rK4QlrPcNeTaZV+1fFScNNo3kD9q3ZRwbM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m921W/j3BXaJKBJqAdWj10lR4BartQYQBkosbtrH5pso7EbO5RQvK3qk9pVqd1LFM 4XzDrH/6+oLBTO882V0OZmB3cvCByv+8PZZcL9FRsGD/FP+lhm+ntS6Kx/qzz+w131 BfBz8IyWbSJgNSQa+PIxhkLyxS0nVtbTH1JPPACY= 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.16 25/28] sfc: extend the locking on mcdi->seqno Date: Thu, 17 Mar 2022 13:46:16 +0100 Message-Id: <20220317124527.479699431@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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:51 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 B771EC433F5 for ; Thu, 17 Mar 2022 12:58:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235512AbiCQM7J (ORCPT ); Thu, 17 Mar 2022 08:59:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232971AbiCQMy6 (ORCPT ); Thu, 17 Mar 2022 08:54:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5358F40E68; Thu, 17 Mar 2022 05:53:42 -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 E3DB361506; Thu, 17 Mar 2022 12:53:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2558C340E9; Thu, 17 Mar 2022 12:53:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521621; bh=BvnQwBFKUR8gZMwjM693Z0CBO57IlbCYmgALUnEdvQc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bf+jqNEkPVCW5+IF3dDIANyfoUq8yArip7WWdW9LRWOGnlThd/CYOD+KxVW1eQQ2S iXHWCDGW5TfEObvlFbWKHIWkBupCtJ9qdMbIHn6JABvr1pzg+90+rVUfG9e7QTSmOd 1tZn3p9wsX5EfYxCTin2BA8AK8Xjdw0YwGeifCdM= 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.16 26/28] bnx2: Fix an error message Date: Thu, 17 Mar 2022 13:46:17 +0100 Message-Id: <20220317124527.507452477@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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 babc955ba64e..b47a8237c6dd 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:51 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 21B06C433FE for ; Thu, 17 Mar 2022 12:58:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235529AbiCQM7L (ORCPT ); Thu, 17 Mar 2022 08:59:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234180AbiCQMzQ (ORCPT ); Thu, 17 Mar 2022 08:55:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E50079A981; Thu, 17 Mar 2022 05:53:49 -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 85F9CB81E01; Thu, 17 Mar 2022 12:53:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA3CEC340E9; Thu, 17 Mar 2022 12:53:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521627; bh=imLRbNBIttWRNaw4IAFVGr5nNbkEISMaVibcAl0KihE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IWjhBYoiUwTrVz/aZI5WRvbsVPaE+lQMkz52HIEH6InwK6rr0sgh8P4fy0xpuygtq jf0LEE+sIwRuRAKPnBOZq1enrmwv4I/4loXjD+4O1U0pxbdRIOcDjUEqDl0BUxyHmJ LahKIPNxyNxcOGfCV3xjtLQ4PRXfEnDdJZyq40lw= 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.16 27/28] kselftest/vm: fix tests build with old libc Date: Thu, 17 Mar 2022 13:46:18 +0100 Message-Id: <20220317124527.534855605@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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:51 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 41180C4332F for ; Thu, 17 Mar 2022 12:58:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235547AbiCQM7O (ORCPT ); Thu, 17 Mar 2022 08:59:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234210AbiCQMzV (ORCPT ); Thu, 17 Mar 2022 08:55:21 -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 4A73BA27E9; Thu, 17 Mar 2022 05:53:53 -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 C1C51B81EA1; Thu, 17 Mar 2022 12:53:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D67E2C36AE2; Thu, 17 Mar 2022 12:53:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521630; bh=ttqHx00Pz/KQ4MnXgN1hjdqSE3T+gxajqzQTE81Z/74=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ym+yOjqntpe+Yxyme7l/EJK1rh1T18cy0yX1BjCDdJgXgkYODQyUp/Sc9Ol9KkYOQ VPCV7WuChRK6DBKQvk6v3Dd/+Gc3+20kraukInrZ3SI6SAltBnX3gaftQFiO2TPv67 +EBDsclOsZM2nysqcGYINnAxDFMsR+7HDLOMO/E0= 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.16 28/28] ice: Fix race condition during interface enslave Date: Thu, 17 Mar 2022 13:46:19 +0100 Message-Id: <20220317124527.562546441@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@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: Justin M. Forbes Tested-by: Linux Kernel Functional Testing Tested-by: Ron Economos Tested-by: Rudi Heitbaum --- 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 @@ -891,7 +891,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 @@ -2237,9 +2237,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;