From nobody Thu Apr 2 18:32:11 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 C1706C6FA82 for ; Wed, 21 Sep 2022 15:52:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231759AbiIUPwG (ORCPT ); Wed, 21 Sep 2022 11:52:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230179AbiIUPvU (ORCPT ); Wed, 21 Sep 2022 11:51:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21AF29C22F; Wed, 21 Sep 2022 08:49:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 882A763138; Wed, 21 Sep 2022 15:48:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B8E5C433D6; Wed, 21 Sep 2022 15:48:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775305; bh=n2AGx12MOguBMY7w6QPaLdfxFfoD2o0St4ptyVUydN0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WWfqoadawnF0yOvm5oOpnS2SIX5X2eljP/7dI8wezQkcmCvlD7hTCTWoY/dSEGov8 fyYDmjplIXztWCYl7Uo4nrefGjkvYqGrLR7XOOtuDuiL8Eaub+K8BlkNed77q5Ymm/ 1FVmKrJnc1d9/wpS72nxj7OZm5OqpG9wv6Dw2zK0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, YueHaibing , Thierry Reding , Sasha Levin Subject: [PATCH 5.15 01/45] drm/tegra: vic: Fix build warning when CONFIG_PM=n Date: Wed, 21 Sep 2022 17:45:51 +0200 Message-Id: <20220921153646.976415033@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore 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: YueHaibing [ Upstream commit b5d5288a46876f6767950449aea310f71ac86277 ] drivers/gpu/drm/tegra/vic.c:326:12: error: =E2=80=98vic_runtime_suspend=E2= =80=99 defined but not used [-Werror=3Dunused-function] static int vic_runtime_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/tegra/vic.c:292:12: error: =E2=80=98vic_runtime_resume=E2= =80=99 defined but not used [-Werror=3Dunused-function] static int vic_runtime_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~ Mark it as __maybe_unused. Signed-off-by: YueHaibing Signed-off-by: Thierry Reding Stable-dep-of: c7860cbee998 ("drm/tegra: Fix vmapping of prime buffers") Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/gpu/drm/tegra/vic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c index da4af5371991..d3e2fab91086 100644 --- a/drivers/gpu/drm/tegra/vic.c +++ b/drivers/gpu/drm/tegra/vic.c @@ -275,7 +275,7 @@ static int vic_load_firmware(struct vic *vic) } =20 =20 -static int vic_runtime_resume(struct device *dev) +static int __maybe_unused vic_runtime_resume(struct device *dev) { struct vic *vic =3D dev_get_drvdata(dev); int err; @@ -309,7 +309,7 @@ static int vic_runtime_resume(struct device *dev) return err; } =20 -static int vic_runtime_suspend(struct device *dev) +static int __maybe_unused vic_runtime_suspend(struct device *dev) { struct vic *vic =3D dev_get_drvdata(dev); int err; --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 19064C6FA8E for ; Wed, 21 Sep 2022 15:54:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231846AbiIUPyv (ORCPT ); Wed, 21 Sep 2022 11:54:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231409AbiIUPxW (ORCPT ); Wed, 21 Sep 2022 11:53:22 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7ECB13F06; Wed, 21 Sep 2022 08:49:58 -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 0F580B830AF; Wed, 21 Sep 2022 15:49:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C5F5C433D7; Wed, 21 Sep 2022 15:48:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775338; bh=Pty2kD4tYPOLUNGbx/iMh4Z5d8Q8KTKQnMyIeZHS3/s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TGapixIlIpg92pJkAHDgRG1OOSlKFIP8WD85FPK9BTpYu9IogO9GhnzPFS5tH42my pWlEgwd6M9bkFtndFklCTlS4vy+yOMNgfxLzVfVMDSWifF+60i9D/bFA52zsd7QJiF BQjv7PzOU3S75TfVyk8o+Q6FGSr4wBTx0SKDefow= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Baoquan He , kexec@lists.infradead.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, Michal Suchanek , Will Deacon , Coiby Xu , Mimi Zohar , Sasha Levin Subject: [PATCH 5.15 02/45] arm64: kexec_file: use more system keyrings to verify kernel image signature Date: Wed, 21 Sep 2022 17:45:52 +0200 Message-Id: <20220921153647.005448861@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Coiby Xu [ Upstream commit 0d519cadf75184a24313568e7f489a7fc9b1be3b ] Currently, when loading a kernel image via the kexec_file_load() system call, arm64 can only use the .builtin_trusted_keys keyring to verify a signature whereas x86 can use three more keyrings i.e. .secondary_trusted_keys, .machine and .platform keyrings. For example, one resulting problem is kexec'ing a kernel image would be rejected with the error "Lockdown: kexec: kexec of unsigned images is restricted; see man kernel_lockdown.7". This patch set enables arm64 to make use of the same keyrings as x86 to verify the signature kexec'ed kernel image. Fixes: 732b7b93d849 ("arm64: kexec_file: add kernel signature verification = support") Cc: stable@vger.kernel.org # 105e10e2cf1c: kexec_file: drop weak attribute = from functions Cc: stable@vger.kernel.org # 34d5960af253: kexec: clean up arch_kexec_kerne= l_verify_sig Cc: stable@vger.kernel.org # 83b7bb2d49ae: kexec, KEYS: make the code in bz= Image64_verify_sig generic Acked-by: Baoquan He Cc: kexec@lists.infradead.org Cc: keyrings@vger.kernel.org Cc: linux-security-module@vger.kernel.org Co-developed-by: Michal Suchanek Signed-off-by: Michal Suchanek Acked-by: Will Deacon Signed-off-by: Coiby Xu Signed-off-by: Mimi Zohar Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- arch/arm64/kernel/kexec_image.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/arch/arm64/kernel/kexec_image.c b/arch/arm64/kernel/kexec_imag= e.c index 9ec34690e255..5ed6a585f21f 100644 --- a/arch/arm64/kernel/kexec_image.c +++ b/arch/arm64/kernel/kexec_image.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -130,18 +129,10 @@ static void *image_load(struct kimage *image, return NULL; } =20 -#ifdef CONFIG_KEXEC_IMAGE_VERIFY_SIG -static int image_verify_sig(const char *kernel, unsigned long kernel_len) -{ - return verify_pefile_signature(kernel, kernel_len, NULL, - VERIFYING_KEXEC_PE_SIGNATURE); -} -#endif - const struct kexec_file_ops kexec_image_ops =3D { .probe =3D image_probe, .load =3D image_load, #ifdef CONFIG_KEXEC_IMAGE_VERIFY_SIG - .verify_sig =3D image_verify_sig, + .verify_sig =3D kexec_kernel_verify_pe_sig, #endif }; --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 6619BECAAD8 for ; Wed, 21 Sep 2022 15:55:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231951AbiIUPz2 (ORCPT ); Wed, 21 Sep 2022 11:55:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232023AbiIUPx6 (ORCPT ); Wed, 21 Sep 2022 11:53:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3892F9F0F4; Wed, 21 Sep 2022 08:50:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 61E6D63147; Wed, 21 Sep 2022 15:49:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A6E2C433D6; Wed, 21 Sep 2022 15:49:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775358; bh=Jxgrg6W4341DNVv5KQzE6tPsH4Ks3+HSQEmFwxDq8PA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I66HeRiDM871liZ2cP+GMQUkiibdyJPOFRidi7XI41XkXCGUWfwvs+RpEThsE+dzP roa49Fgs1Zqu34bBTmeD68e/r3sQccCP6aWOWMp+ExfFTrAoD7Ci9um29pjDolXeMy Txa6kJcd3pXnUAQNixTTRIEg/6vQR1SSwvgesQtk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Claudiu Beznea , Richard Genoud , Lino Sanfilippo , Sasha Levin Subject: [PATCH 5.15 03/45] serial: atmel: remove redundant assignment in rs485_config Date: Wed, 21 Sep 2022 17:45:53 +0200 Message-Id: <20220921153647.034378740@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Lino Sanfilippo [ Upstream commit 60efd0513916f195dd85bfbf21653f74f9ab019c ] In uart_set_rs485_config() the serial core already assigns the passed serial_rs485 struct to the uart port. So remove the assignment from the drivers rs485_config() function to avoid redundancy. Reviewed-by: Claudiu Beznea Acked-by: Richard Genoud Signed-off-by: Lino Sanfilippo Link: https://lore.kernel.org/r/20220410104642.32195-10-LinoSanfilippo@gmx.= de Signed-off-by: Greg Kroah-Hartman Stable-dep-of: 692a8ebcfc24 ("tty: serial: atmel: Preserve previous USART m= ode if RS485 disabled") Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/tty/serial/atmel_serial.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_s= erial.c index dd350c590880..92383c8610ee 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -298,11 +298,9 @@ static int atmel_config_rs485(struct uart_port *port, /* Resetting serial mode to RS232 (0x0) */ mode &=3D ~ATMEL_US_USMODE; =20 - port->rs485 =3D *rs485conf; - if (rs485conf->flags & SER_RS485_ENABLED) { dev_dbg(port->dev, "Setting UART to RS485\n"); - if (port->rs485.flags & SER_RS485_RX_DURING_TX) + if (rs485conf->flags & SER_RS485_RX_DURING_TX) atmel_port->tx_done_mask =3D ATMEL_US_TXRDY; else atmel_port->tx_done_mask =3D ATMEL_US_TXEMPTY; --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 0BC87C6FA82 for ; Wed, 21 Sep 2022 15:52:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231734AbiIUPwr (ORCPT ); Wed, 21 Sep 2022 11:52:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231572AbiIUPve (ORCPT ); Wed, 21 Sep 2022 11:51:34 -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 EBD689E884; Wed, 21 Sep 2022 08:49:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 782FD63141; Wed, 21 Sep 2022 15:49:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7EA3AC433D6; Wed, 21 Sep 2022 15:49:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775361; bh=8h1b+0s6o2B2gx/ZKPPZXC5/T0oHPjx9k7Z6hbcGS04=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zGQTafKXxuQtvjCMu8T8+TjlNB3uMV4Z8HNzWWXLnoNOSNE+htM5WsMVuG8FqQX5k 8DcpFhTUEjiMBvjYTNiPr8ljXc7xpTOv50yKfyE1eqIaeOtm42M/oVQ56lGFJoEJiP LVBEqknV1lejqepn7qjJ74RUcdwU9B4pWUO4UI5w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, stable , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Sergiu Moga , Sasha Levin Subject: [PATCH 5.15 04/45] tty: serial: atmel: Preserve previous USART mode if RS485 disabled Date: Wed, 21 Sep 2022 17:45:54 +0200 Message-Id: <20220921153647.062857015@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Sergiu Moga [ Upstream commit 692a8ebcfc24f4a5bea0eb2967e450f584193da6 ] Whenever the atmel_rs485_config() driver method would be called, the USART mode is reset to normal mode before even checking if RS485 flag is set, thus resulting in losing the previous USART mode in the case where the checking fails. Some tools, such as `linux-serial-test`, lead to the driver calling this method when doing the setup of the serial port: after setting the port mode (Hardware Flow Control, Normal Mode, RS485 Mode, etc.), `linux-serial-test` tries to enable/disable RS485 depending on the commandline arguments that were passed. Example of how this issue could reveal itself: When doing a serial communication with Hardware Flow Control through `linux-serial-test`, the tool would lead to the driver roughly doing the following: - set the corresponding bit to 1 (ATMEL_US_USMODE_HWHS bit in the ATMEL_US_MR register) through the atmel_set_termios() to enable Hardware Flow Control - disable RS485 through the atmel_config_rs485() method Thus, when the latter is called, the mode will be reset and the previously set bit is unset, leaving USART in normal mode instead of the expected Hardware Flow Control mode. This fix ensures that this reset is only done if the checking for RS485 succeeds and that the previous mode is preserved otherwise. Fixes: e8faff7330a35 ("ARM: 6092/1: atmel_serial: support for RS485 communi= cations") Cc: stable Reviewed-by: Ilpo J=C3=A4rvinen Signed-off-by: Sergiu Moga Link: https://lore.kernel.org/r/20220824142902.502596-1-sergiu.moga@microch= ip.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/tty/serial/atmel_serial.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_s= erial.c index 92383c8610ee..c0a86558ceaa 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -295,9 +295,6 @@ static int atmel_config_rs485(struct uart_port *port, =20 mode =3D atmel_uart_readl(port, ATMEL_US_MR); =20 - /* Resetting serial mode to RS232 (0x0) */ - mode &=3D ~ATMEL_US_USMODE; - if (rs485conf->flags & SER_RS485_ENABLED) { dev_dbg(port->dev, "Setting UART to RS485\n"); if (rs485conf->flags & SER_RS485_RX_DURING_TX) @@ -307,6 +304,7 @@ static int atmel_config_rs485(struct uart_port *port, =20 atmel_uart_writel(port, ATMEL_US_TTGR, rs485conf->delay_rts_after_send); + mode &=3D ~ATMEL_US_USMODE; mode |=3D ATMEL_US_USMODE_RS485; } else { dev_dbg(port->dev, "Setting UART to RS232\n"); --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 F22D7C6FA8E for ; Wed, 21 Sep 2022 15:55:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231887AbiIUPzA (ORCPT ); Wed, 21 Sep 2022 11:55:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231779AbiIUPxX (ORCPT ); Wed, 21 Sep 2022 11:53:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0C61193E4; Wed, 21 Sep 2022 08:49:45 -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 07A95B830B5; Wed, 21 Sep 2022 15:49:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B07FC433D6; Wed, 21 Sep 2022 15:49:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775364; bh=UiPE8rqlPTX0dh8dIFK0MfchVDUbVH3shIF9ud1jR3M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FCbPM6jtSdquvrB5B0o7U5oyewo+FfSFnAtm92+WZbPNH2bZuCqjthDs+vrvd4nK5 1q26LuB3kUw2+pKw4iBqh6nJ6fFVIcdxtMFQvsFD8fwh56flKuTlIjzJJ+9xBUapxw WegQoZhMJ/DTYrzgofCRKSH5y8BD/NZZ8yP2vXXE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sergey Shtylyov , Rob Herring , Sasha Levin Subject: [PATCH 5.15 05/45] of: fdt: fix off-by-one error in unflatten_dt_nodes() Date: Wed, 21 Sep 2022 17:45:55 +0200 Message-Id: <20220921153647.090875235@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Sergey Shtylyov [ Upstream commit 2f945a792f67815abca26fa8a5e863ccf3fa1181 ] Commit 78c44d910d3e ("drivers/of: Fix depth when unflattening devicetree") forgot to fix up the depth check in the loop body in unflatten_dt_nodes() which makes it possible to overflow the nps[] buffer... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Fixes: 78c44d910d3e ("drivers/of: Fix depth when unflattening devicetree") Signed-off-by: Sergey Shtylyov Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/7c354554-006f-6b31-c195-cdfe4caee392@omp.ru Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/of/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index d245628b15dd..338171c978cc 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -313,7 +313,7 @@ static int unflatten_dt_nodes(const void *blob, for (offset =3D 0; offset >=3D 0 && depth >=3D initial_depth; offset =3D fdt_next_node(blob, offset, &depth)) { - if (WARN_ON_ONCE(depth >=3D FDT_MAX_DEPTH)) + if (WARN_ON_ONCE(depth >=3D FDT_MAX_DEPTH - 1)) continue; =20 if (!IS_ENABLED(CONFIG_OF_KOBJ) && --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 9B39EC6FA82 for ; Wed, 21 Sep 2022 15:56:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229664AbiIUP4J (ORCPT ); Wed, 21 Sep 2022 11:56:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232108AbiIUPyK (ORCPT ); Wed, 21 Sep 2022 11:54:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 539C29F1B6; Wed, 21 Sep 2022 08:50: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 ams.source.kernel.org (Postfix) with ESMTPS id 21C0FB830A7; Wed, 21 Sep 2022 15:49:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60866C433C1; Wed, 21 Sep 2022 15:49:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775367; bh=SNFdJ3w/mG2aN1OIziJV0McO1Xmp62FkAd6cnm7iISg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sEsZuYjgwaaxiLx5k7Ch0IFhxj++8OpG5milQDU7vnRezKVHSAeBAqZZQ7vOyOVzM O67BqrrFDAL4bUdiO/Ay5CrM343KpxaHn8Z1OutQN9b5LbEn3oKxtWs4vvEVrXUNA9 +mFX+Al+/CQz3iECs8BQ1yqc1tK4ZoTL+OVKj2tk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Molly Sophia , Bjorn Andersson , Linus Walleij , Sasha Levin Subject: [PATCH 5.15 06/45] pinctrl: qcom: sc8180x: Fix gpio_wakeirq_map Date: Wed, 21 Sep 2022 17:45:56 +0200 Message-Id: <20220921153647.120315519@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Molly Sophia [ Upstream commit 6124cec530c7d8faab96d340ab2df5161e5d1c8a ] Currently in the wakeirq_map, gpio36 and gpio37 have the same wakeirq number, resulting in gpio37 being unable to trigger interrupts. It looks like that this is a typo in the wakeirq map. So fix it. Signed-off-by: Molly Sophia Fixes: 97423113ec4b ("pinctrl: qcom: Add sc8180x TLMM driver") Tested-by: Bjorn Andersson Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220807122645.13830-2-mollysophia379@gmail= .com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/pinctrl/qcom/pinctrl-sc8180x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/qcom/pinctrl-sc8180x.c b/drivers/pinctrl/qcom/= pinctrl-sc8180x.c index 0d9654b4ab60..32a2d8c5ceae 100644 --- a/drivers/pinctrl/qcom/pinctrl-sc8180x.c +++ b/drivers/pinctrl/qcom/pinctrl-sc8180x.c @@ -1582,7 +1582,7 @@ static const int sc8180x_acpi_reserved_gpios[] =3D { static const struct msm_gpio_wakeirq_map sc8180x_pdc_map[] =3D { { 3, 31 }, { 5, 32 }, { 8, 33 }, { 9, 34 }, { 10, 100 }, { 12, 104 }, { 24, 37 }, { 26, 38 }, { 27, 41 }, { 28, 42 }, { 30, 39 }, { 36, 43 }, - { 37, 43 }, { 38, 45 }, { 39, 118 }, { 39, 125 }, { 41, 47 }, + { 37, 44 }, { 38, 45 }, { 39, 118 }, { 39, 125 }, { 41, 47 }, { 42, 48 }, { 46, 50 }, { 47, 49 }, { 48, 51 }, { 49, 53 }, { 50, 52 }, { 51, 116 }, { 51, 123 }, { 53, 54 }, { 54, 55 }, { 55, 56 }, { 56, 57 }, { 58, 58 }, { 60, 60 }, { 68, 62 }, { 70, 63 }, { 76, 86 }, --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 BBF64C6FA8E for ; Wed, 21 Sep 2022 15:54:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231629AbiIUPyX (ORCPT ); Wed, 21 Sep 2022 11:54:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231821AbiIUPwo (ORCPT ); Wed, 21 Sep 2022 11:52:44 -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 A08CE3C144; Wed, 21 Sep 2022 08:49: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 dfw.source.kernel.org (Postfix) with ESMTPS id 75D7F63138; Wed, 21 Sep 2022 15:49:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68AC2C433D6; Wed, 21 Sep 2022 15:49:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775370; bh=T4HvC8yXhIBoI7Uz+o4CufFA8Nd+teDpEZ+zCprH8uQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=siwDE4RVpihCwjAIo/3l4MeYL4XplCLkaK3DVr8tyRf7l5VKMSOpU+3dJsN8aTxxE +jKkbHrJkeNtq4h7CMgXxSSsUICybhXreeoSH3IYqsNRh33Bu7NcxqSQ7NhIXAayYh B7m69o9G79xSckkVVycXoIMAfcqhuniifH4ncrSg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Molly Sophia , Bjorn Andersson , Linus Walleij , Sasha Levin Subject: [PATCH 5.15 07/45] pinctrl: qcom: sc8180x: Fix wrong pin numbers Date: Wed, 21 Sep 2022 17:45:57 +0200 Message-Id: <20220921153647.148379218@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Molly Sophia [ Upstream commit 48ec73395887694f13c9452b4dcfb43710451757 ] The pin numbers for UFS_RESET and SDC2_* are not consistent in the pinctrl driver for sc8180x. So fix it. Signed-off-by: Molly Sophia Fixes: 97423113ec4b ("pinctrl: qcom: Add sc8180x TLMM driver") Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220807122645.13830-3-mollysophia379@gmail= .com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/pinctrl/qcom/pinctrl-sc8180x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/qcom/pinctrl-sc8180x.c b/drivers/pinctrl/qcom/= pinctrl-sc8180x.c index 32a2d8c5ceae..a4725ff12da0 100644 --- a/drivers/pinctrl/qcom/pinctrl-sc8180x.c +++ b/drivers/pinctrl/qcom/pinctrl-sc8180x.c @@ -530,10 +530,10 @@ DECLARE_MSM_GPIO_PINS(187); DECLARE_MSM_GPIO_PINS(188); DECLARE_MSM_GPIO_PINS(189); =20 -static const unsigned int sdc2_clk_pins[] =3D { 190 }; -static const unsigned int sdc2_cmd_pins[] =3D { 191 }; -static const unsigned int sdc2_data_pins[] =3D { 192 }; -static const unsigned int ufs_reset_pins[] =3D { 193 }; +static const unsigned int ufs_reset_pins[] =3D { 190 }; +static const unsigned int sdc2_clk_pins[] =3D { 191 }; +static const unsigned int sdc2_cmd_pins[] =3D { 192 }; +static const unsigned int sdc2_data_pins[] =3D { 193 }; =20 enum sc8180x_functions { msm_mux_adsp_ext, --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 31A76C6FA82 for ; Wed, 21 Sep 2022 15:54:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231826AbiIUPyn (ORCPT ); Wed, 21 Sep 2022 11:54:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231844AbiIUPxE (ORCPT ); Wed, 21 Sep 2022 11:53:04 -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 35065857FB; Wed, 21 Sep 2022 08:50: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 dfw.source.kernel.org (Postfix) with ESMTPS id B05D263143; Wed, 21 Sep 2022 15:49:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4162C433C1; Wed, 21 Sep 2022 15:49:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775374; bh=MjVpQg01ZuAjFEFCSzFirXe7GMa7gxyPJoxPoKsIjd0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B6gV01iZVPBm6KgmcWZkcrAkKaH4ITgx/Ae09AbV4T0CUEv80GRh6OKMplQ4EHUPL tlpxZtA8gTTZcBb266mWkFcSW/PcPammEI3tByB22k2hj2OHCycHFsf227pJ686wmt Emu/v6KJycbbQNBWQwo5tkjhWN+XbBXd/OiXhnNc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "=?UTF-8?q?Jo=C3=A3o=20H . =20Spies?=" , Linus Walleij , Sasha Levin Subject: [PATCH 5.15 08/45] pinctrl: rockchip: Enhance support for IRQ_TYPE_EDGE_BOTH Date: Wed, 21 Sep 2022 17:45:58 +0200 Message-Id: <20220921153647.182046742@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Jo=C3=A3o H. Spies [ Upstream commit b871656aa4f54e04207f62bdd0d7572be1d86b36 ] Switching between falling/rising edges for IRQ_TYPE_EDGE_BOTH on pins that require debounce can cause the device to lose events due to a desync between pin state and irq type. This problem is resolved by switching between IRQ_TYPE_LEVEL_LOW and IRQ_TYPE_LEVEL_HIGH instead. Fixes: 936ee2675eee ("gpio/rockchip: add driver for rockchip gpio") Signed-off-by: Jo=C3=A3o H. Spies Link: https://lore.kernel.org/r/20220808025121.110223-1-jhlspies@gmail.com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/gpio/gpio-rockchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c index 22b8f0aa80f1..f31b0947eaaa 100644 --- a/drivers/gpio/gpio-rockchip.c +++ b/drivers/gpio/gpio-rockchip.c @@ -418,11 +418,11 @@ static int rockchip_irq_set_type(struct irq_data *d, = unsigned int type) goto out; } else { bank->toggle_edge_mode |=3D mask; - level |=3D mask; + level &=3D ~mask; =20 /* * Determine gpio state. If 1 next interrupt should be - * falling otherwise rising. + * low otherwise high. */ data =3D readl(bank->reg_base + bank->gpio_regs->ext_port); if (data & mask) --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 37301C6FA8B for ; Wed, 21 Sep 2022 15:56:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232051AbiIUP4F (ORCPT ); Wed, 21 Sep 2022 11:56:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232103AbiIUPyK (ORCPT ); Wed, 21 Sep 2022 11:54:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA4339F77A; Wed, 21 Sep 2022 08:50:38 -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 8C665B830B1; Wed, 21 Sep 2022 15:49:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDC25C433D7; Wed, 21 Sep 2022 15:49:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775377; bh=APIfy+CENXuoyhydiMfxIatMOxxvZLvNCfx6BXp/sOo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jyXCz0Tpn0XsAD4q0SVxTI3dJy78FnHh/KZBUiG4iUmrSPMSENfDS822ucHe8zLot UuJLRW8YN8fKUgwsLjuLiwldGutpaJWcwd4cTP5oX8cXm88WSVg7wGy0g9UGxKt3Bz O0srvdVUM18t33vMf9qDqFss3/gEZGNtrh+OBW0A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Wu , Samuel Holland , Linus Walleij , Sasha Levin Subject: [PATCH 5.15 09/45] pinctrl: sunxi: Fix name for A100 R_PIO Date: Wed, 21 Sep 2022 17:45:59 +0200 Message-Id: <20220921153647.210173201@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Michael Wu [ Upstream commit 76648c867c6c03b8a468d9c9222025873ecc613d ] The name of A100 R_PIO driver should be sun50i-a100-r-pinctrl, not sun50iw10p1-r-pinctrl. Fixes: 473436e7647d6 ("pinctrl: sunxi: add support for the Allwinner A100 p= in controller") Signed-off-by: Michael Wu Acked-by: Samuel Holland Link: https://lore.kernel.org/r/20220819024541.74191-1-michael@allwinnertec= h.com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c b/drivers/pinctr= l/sunxi/pinctrl-sun50i-a100-r.c index 21054fcacd34..18088f6f44b2 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c +++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c @@ -98,7 +98,7 @@ MODULE_DEVICE_TABLE(of, a100_r_pinctrl_match); static struct platform_driver a100_r_pinctrl_driver =3D { .probe =3D a100_r_pinctrl_probe, .driver =3D { - .name =3D "sun50iw10p1-r-pinctrl", + .name =3D "sun50i-a100-r-pinctrl", .of_match_table =3D a100_r_pinctrl_match, }, }; --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 EC652C6FA8E for ; Wed, 21 Sep 2022 15:52:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231814AbiIUPwd (ORCPT ); Wed, 21 Sep 2022 11:52:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231708AbiIUPvb (ORCPT ); Wed, 21 Sep 2022 11:51:31 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5DA49E8AA; Wed, 21 Sep 2022 08:49:20 -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 6C25EB830A1; Wed, 21 Sep 2022 15:48:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6BA1C433C1; Wed, 21 Sep 2022 15:48:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775309; bh=+HCllXlnqBDQwngOC8CBmjyv1e79z5szIychz09iPv4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fYikXMVYXLfl9wiUI/I3guawLRWrcuhF2UJdJaEkFg/gZLnZubDx/KvmtfzXFMZEu dCgQLww+IguwBpCI+KQxAwduzIkPD9OJ9TVgIraEoCNVReJ+7dRc7JkMog7V2zbL4E 04BypjraaTlS1kOdZmI1Nl+ibsLqY5LTx1P01JTc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chuck Lever III , Trond Myklebust , Sasha Levin Subject: [PATCH 5.15 10/45] NFSv4: Turn off open-by-filehandle and NFS re-export for NFSv4.0 Date: Wed, 21 Sep 2022 17:46:00 +0200 Message-Id: <20220921153647.237896554@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Trond Myklebust [ Upstream commit 2a9d683b48c8a87e61a4215792d44c90bcbbb536 ] The NFSv4.0 protocol only supports open() by name. It cannot therefore be used with open_by_handle() and friends, nor can it be re-exported by knfsd. Reported-by: Chuck Lever III Fixes: 20fa19027286 ("nfs: add export operations") Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- fs/nfs/super.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/fs/nfs/super.c b/fs/nfs/super.c index e65c83494c05..a847011f36c9 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -1046,22 +1046,31 @@ static void nfs_fill_super(struct super_block *sb, = struct nfs_fs_context *ctx) if (ctx->bsize) sb->s_blocksize =3D nfs_block_size(ctx->bsize, &sb->s_blocksize_bits); =20 - if (server->nfs_client->rpc_ops->version !=3D 2) { - /* The VFS shouldn't apply the umask to mode bits. We will do - * so ourselves when necessary. + switch (server->nfs_client->rpc_ops->version) { + case 2: + sb->s_time_gran =3D 1000; + sb->s_time_min =3D 0; + sb->s_time_max =3D U32_MAX; + break; + case 3: + /* + * The VFS shouldn't apply the umask to mode bits. + * We will do so ourselves when necessary. */ sb->s_flags |=3D SB_POSIXACL; sb->s_time_gran =3D 1; - sb->s_export_op =3D &nfs_export_ops; - } else - sb->s_time_gran =3D 1000; - - if (server->nfs_client->rpc_ops->version !=3D 4) { sb->s_time_min =3D 0; sb->s_time_max =3D U32_MAX; - } else { + sb->s_export_op =3D &nfs_export_ops; + break; + case 4: + sb->s_flags |=3D SB_POSIXACL; + sb->s_time_gran =3D 1; sb->s_time_min =3D S64_MIN; sb->s_time_max =3D S64_MAX; + if (server->caps & NFS_CAP_ATOMIC_OPEN_V1) + sb->s_export_op =3D &nfs_export_ops; + break; } =20 sb->s_magic =3D NFS_SUPER_MAGIC; --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 63D1EC6FA90 for ; Wed, 21 Sep 2022 15:53:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231843AbiIUPxE (ORCPT ); Wed, 21 Sep 2022 11:53:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231739AbiIUPvu (ORCPT ); Wed, 21 Sep 2022 11:51:50 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E02D6F02; Wed, 21 Sep 2022 08:49:30 -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 49F63B82714; Wed, 21 Sep 2022 15:48:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD31AC433C1; Wed, 21 Sep 2022 15:48:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775312; bh=v90XGXtjV5KepYTypBN1Kkz6+3fOaoGS4G1/0MG3RGo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BY6RifzPQouoeDm8OPRqg/IvW873bn6Cslk9Flc9psDbi1es7Hvr4Pqq5S7lcUQKT omGoPjc+9qdZpszwqoaly8xP6sIUTKOWyCTvcl9uNkJtDXPG/BJvo5IWmabLg46shx hFVIh5JQMdpLd42o4+rlulgxKe6/Yx9i5XJWCjPM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= , Bartosz Golaszewski , Sasha Levin Subject: [PATCH 5.15 11/45] gpio: mpc8xxx: Fix support for IRQ_TYPE_LEVEL_LOW flow_type in mpc85xx Date: Wed, 21 Sep 2022 17:46:01 +0200 Message-Id: <20220921153647.266445929@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Pali Roh=C3=A1r [ Upstream commit 279c12df8d2efb28def9d037f288cbfb97c30fe2 ] Commit e39d5ef67804 ("powerpc/5xxx: extend mpc8xxx_gpio driver to support mpc512x gpios") implemented support for IRQ_TYPE_LEVEL_LOW flow type in mpc512x via falling edge type. Do same for mpc85xx which support was added in commit 345e5c8a1cc3 ("powerpc: Add interrupt support to mpc8xxx_gpio"). Fixes probing of lm90 hwmon driver on mpc85xx based board which use level interrupt. Without it kernel prints error and refuse lm90 to work: [ 15.258370] genirq: Setting trigger mode 8 for irq 49 failed (mpc8xx= x_irq_set_type+0x0/0xf8) [ 15.267168] lm90 0-004c: cannot request IRQ 49 [ 15.272708] lm90: probe of 0-004c failed with error -22 Fixes: 345e5c8a1cc3 ("powerpc: Add interrupt support to mpc8xxx_gpio") Signed-off-by: Pali Roh=C3=A1r Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/gpio/gpio-mpc8xxx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index a964e25ea620..763256efddc2 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -172,6 +172,7 @@ static int mpc8xxx_irq_set_type(struct irq_data *d, uns= igned int flow_type) =20 switch (flow_type) { case IRQ_TYPE_EDGE_FALLING: + case IRQ_TYPE_LEVEL_LOW: raw_spin_lock_irqsave(&mpc8xxx_gc->lock, flags); gc->write_reg(mpc8xxx_gc->regs + GPIO_ICR, gc->read_reg(mpc8xxx_gc->regs + GPIO_ICR) --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 7ED71C6FA8E for ; Wed, 21 Sep 2022 15:51:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229841AbiIUPvc (ORCPT ); Wed, 21 Sep 2022 11:51:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231370AbiIUPuv (ORCPT ); Wed, 21 Sep 2022 11:50:51 -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 4FE219AFF8; Wed, 21 Sep 2022 08:48:43 -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 BEC7963141; Wed, 21 Sep 2022 15:48:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AFC1DC433D6; Wed, 21 Sep 2022 15:48:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775315; bh=6Cceott/YXODbjHwpzVuoUWmAECTmhrg0aAWRMZUg3U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WpdDu2FkY+cl2Ac+iWOE3hXjI/RpKDhfll32Vl/zmz3ggFXPReXxOm4N6Y2xxYGIM /T8r4NgzHSyseNMxd8wZhGK4hxMtN+XQZWzVwJ/fvDIjhoEZdycIx2EH7kg1XK0Er4 dBa7sUurb0DhVKOUtk9DlFMO7NL9N7G9GUmaypSA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stuart Menefy , Neil Armstrong , Sasha Levin Subject: [PATCH 5.15 12/45] drm/meson: Correct OSD1 global alpha value Date: Wed, 21 Sep 2022 17:46:02 +0200 Message-Id: <20220921153647.294852095@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Stuart Menefy [ Upstream commit 6836829c8ea453c9e3e518e61539e35881c8ed5f ] VIU_OSD1_CTRL_STAT.GLOBAL_ALPHA is a 9 bit field, so the maximum value is 0x100 not 0xff. This matches the vendor kernel. Signed-off-by: Stuart Menefy Fixes: bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller= ") Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20220908155103.686904-1= -stuart.menefy@mathembedded.com Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/gpu/drm/meson/meson_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/meson/meson_plane.c b/drivers/gpu/drm/meson/me= son_plane.c index 8640a8a8a469..44aa52629443 100644 --- a/drivers/gpu/drm/meson/meson_plane.c +++ b/drivers/gpu/drm/meson/meson_plane.c @@ -168,7 +168,7 @@ static void meson_plane_atomic_update(struct drm_plane = *plane, =20 /* Enable OSD and BLK0, set max global alpha */ priv->viu.osd1_ctrl_stat =3D OSD_ENABLE | - (0xFF << OSD_GLOBAL_ALPHA_SHIFT) | + (0x100 << OSD_GLOBAL_ALPHA_SHIFT) | OSD_BLK0_ENABLE; =20 priv->viu.osd1_ctrl_stat2 =3D readl(priv->io_base + --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 90890C6FA91 for ; Wed, 21 Sep 2022 15:53:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231714AbiIUPx1 (ORCPT ); Wed, 21 Sep 2022 11:53:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231701AbiIUPwT (ORCPT ); Wed, 21 Sep 2022 11:52:19 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ECED175BC; Wed, 21 Sep 2022 08:49:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8EC0CB830AC; Wed, 21 Sep 2022 15:48:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAA9BC433D6; Wed, 21 Sep 2022 15:48:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775318; bh=8KchVOiklKldhDSmnwE9qC9ds7RMp8LSqO/hd4CFmxA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RG48jCIjrpGb7/Mc9o8zLEM2Z4N473t//GrrO3qvcP9e+R2kGK/H+o+zQ28+PuVVF Bx+W0s5+X0K1svGmB5hLUnhhdY1xxn5AX2UdUDn9WJASkDlofrEktN4QSQ/ea9cNpW IeX29A1Mw/vX+NKSRFBTak3R/K1Gux3d62T+rNwY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stuart Menefy , Neil Armstrong , Sasha Levin Subject: [PATCH 5.15 13/45] drm/meson: Fix OSD1 RGB to YCbCr coefficient Date: Wed, 21 Sep 2022 17:46:03 +0200 Message-Id: <20220921153647.322623957@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Stuart Menefy [ Upstream commit 6463d3930ba5b6addcfc8f80a4543976a2fc7656 ] VPP_WRAP_OSD1_MATRIX_COEF22.Coeff22 is documented as being bits 0-12, not 16-28. Without this the output tends to have a pink hue, changing it results in better color accuracy. The vendor kernel doesn't use this register. However the code which sets VIU2_OSD1_MATRIX_COEF22 also uses bits 0-12. There is a slightly different style of registers for configuring some of the other matrices, which do use bits 16-28 for this coefficient, but those have names ending in MATRIX_COEF22_30, and this is not one of those. Signed-off-by: Stuart Menefy Fixes: 728883948b0d ("drm/meson: Add G12A Support for VIU setup") Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20220908155243.687143-1= -stuart.menefy@mathembedded.com Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/gpu/drm/meson/meson_viu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/meson/meson_viu.c b/drivers/gpu/drm/meson/meso= n_viu.c index bb7e109534de..d4b907889a21 100644 --- a/drivers/gpu/drm/meson/meson_viu.c +++ b/drivers/gpu/drm/meson/meson_viu.c @@ -94,7 +94,7 @@ static void meson_viu_set_g12a_osd1_matrix(struct meson_d= rm *priv, priv->io_base + _REG(VPP_WRAP_OSD1_MATRIX_COEF11_12)); writel(((m[9] & 0x1fff) << 16) | (m[10] & 0x1fff), priv->io_base + _REG(VPP_WRAP_OSD1_MATRIX_COEF20_21)); - writel((m[11] & 0x1fff) << 16, + writel((m[11] & 0x1fff), priv->io_base + _REG(VPP_WRAP_OSD1_MATRIX_COEF22)); =20 writel(((m[18] & 0xfff) << 16) | (m[19] & 0xfff), --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 7D153C6FA82 for ; Wed, 21 Sep 2022 15:51:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231727AbiIUPvm (ORCPT ); Wed, 21 Sep 2022 11:51:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231675AbiIUPu5 (ORCPT ); Wed, 21 Sep 2022 11:50:57 -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 F36669DFB4; Wed, 21 Sep 2022 08:48: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 9ABE5B830AE; Wed, 21 Sep 2022 15:48:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 107C0C433D6; Wed, 21 Sep 2022 15:48:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775321; bh=m9fBFgTkUYazqlw1sNkNTr2KnM7kgiZnwAFGwC9yHZY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BDLeHI4w4zdmE3FDmeL/hjyRpeLPcq12UGyPyxvfLqwsBx2NQs8T/YAE7M5ApU6t8 FxQ+q00mtQbWQPDbJ6KsgjLMg+OtI502OHPFbm7V2n94I5aMvL1bV49ToQMX9sbVE4 pqsFeG2rQpQpiqjzxo00svBWSHP5EckYrJkFMCUY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Roesch , Jens Axboe , Sasha Levin Subject: [PATCH 5.15 14/45] block: blk_queue_enter() / __bio_queue_enter() must return -EAGAIN for nowait Date: Wed, 21 Sep 2022 17:46:04 +0200 Message-Id: <20220921153647.356578998@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Stefan Roesch [ Upstream commit 56f99b8d06ef1ed1c9730948f9f05ac2b930a20b ] Today blk_queue_enter() and __bio_queue_enter() return -EBUSY for the nowait code path. This is not correct: they should return -EAGAIN instead. This problem was detected by fio. The following command exposed the above problem: t/io_uring -p0 -d128 -b4096 -s32 -c32 -F1 -B0 -R0 -X1 -n24 -P1 -u1 -O0 /dev= /ng0n1 By applying the patch, the retry case is handled correctly in the slow path. Signed-off-by: Stefan Roesch Fixes: bfd343aa1718 ("blk-mq: don't wait in blk_mq_queue_enter() if __GFP_W= AIT isn't set") Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- block/blk-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 5009b9f1c3c9..13e1fca1e923 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -447,7 +447,7 @@ int blk_queue_enter(struct request_queue *q, blk_mq_req= _flags_t flags) =20 while (!blk_try_enter_queue(q, pm)) { if (flags & BLK_MQ_REQ_NOWAIT) - return -EBUSY; + return -EAGAIN; =20 /* * read pair of barrier in blk_freeze_queue_start(), we need to @@ -478,7 +478,7 @@ static inline int bio_queue_enter(struct bio *bio) if (test_bit(GD_DEAD, &disk->state)) goto dead; bio_wouldblock_error(bio); - return -EBUSY; + return -EAGAIN; } =20 /* --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 8F8D0C6FA82 for ; Wed, 21 Sep 2022 15:54:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231872AbiIUPxh (ORCPT ); Wed, 21 Sep 2022 11:53:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231706AbiIUPw3 (ORCPT ); Wed, 21 Sep 2022 11:52:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2B672AE17; Wed, 21 Sep 2022 08:49:47 -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 D8BD262C83; Wed, 21 Sep 2022 15:48:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E444FC433D6; Wed, 21 Sep 2022 15:48:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775324; bh=e4CTjNg0VHlzgBruGLyh0ezOhAX+QdTKZInHbKUri8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L+LPHZKlV4DfercFN1ruBTDeS5ndot33M0s64Cz2VEckaScYUARA9P3Vwd08lJ1Mk Hhw+yk1SFwTuN2b19xPxekgqdPT/tVgMPXLuXjZXgd1MAzEREr0oZPARK9gYYvvz8V X/HTjn28nNd+81k8u7npxIViATmeHlI4VFSftD2M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yang Yingliang , Helge Deller , Sasha Levin Subject: [PATCH 5.15 15/45] parisc: ccio-dma: Add missing iounmap in error path in ccio_probe() Date: Wed, 21 Sep 2022 17:46:05 +0200 Message-Id: <20220921153647.390012264@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Yang Yingliang [ Upstream commit 38238be4e881a5d0abbe4872b4cd6ed790be06c8 ] Add missing iounmap() before return from ccio_probe(), if ccio_init_resourc= es() fails. Fixes: d46c742f827f ("parisc: ccio-dma: Handle kmalloc failure in ccio_init= _resources()") Signed-off-by: Yang Yingliang Signed-off-by: Helge Deller Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/parisc/ccio-dma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index f69ab90b5e22..6052f264bbb0 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c @@ -1546,6 +1546,7 @@ static int __init ccio_probe(struct parisc_device *de= v) } ccio_ioc_init(ioc); if (ccio_init_resources(ioc)) { + iounmap(ioc->ioc_regs); kfree(ioc); return -ENOMEM; } --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 6957FC6FA90 for ; Wed, 21 Sep 2022 15:54:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231751AbiIUPyc (ORCPT ); Wed, 21 Sep 2022 11:54:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231827AbiIUPwr (ORCPT ); Wed, 21 Sep 2022 11:52:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E6E6AE74; Wed, 21 Sep 2022 08:49:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B8D7D630B2; Wed, 21 Sep 2022 15:48:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0237C433D6; Wed, 21 Sep 2022 15:48:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775327; bh=wCAQJ4eQrrJ3APQcolF3jIUnI0Y+3eKZnUZwa06m/G0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dSNqUb1c1c61QDu72FLrM/AQIakpoR1xk4DsVXsMdkcX8RWr0+wI1Oot+bwvafiKs MsNpsmaTU3r6Wb4XsuKCMXMySu/0JtTOrHtAwe5d1RsSuLXuCD3Ids6UD9Hu2yXkCa DBSD4X5U0Pn6aDeKRw4lejOmacXSOKPzFqIOUsoI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thierry Reding , Frank Rowand , Lorenzo Pieralisi , Rob Herring Subject: [PATCH 5.15 16/45] of/device: Fix up of_dma_configure_id() stub Date: Wed, 21 Sep 2022 17:46:06 +0200 Message-Id: <20220921153647.417919336@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Thierry Reding commit 40bfe7a86d84cf08ac6a8fe2f0c8bf7a43edd110 upstream. Since the stub version of of_dma_configure_id() was added in commit a081bd4af4ce ("of/device: Add input id to of_dma_configure()"), it has not matched the signature of the full function, leading to build failure reports when code using this function is built on !OF configurations. Fixes: a081bd4af4ce ("of/device: Add input id to of_dma_configure()") Cc: stable@vger.kernel.org Signed-off-by: Thierry Reding Reviewed-by: Frank Rowand Acked-by: Lorenzo Pieralisi Link: https://lore.kernel.org/r/20220824153256.1437483-1-thierry.reding@gma= il.com Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- include/linux/of_device.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/include/linux/of_device.h +++ b/include/linux/of_device.h @@ -101,8 +101,9 @@ static inline struct device_node *of_cpu } =20 static inline int of_dma_configure_id(struct device *dev, - struct device_node *np, - bool force_dma) + struct device_node *np, + bool force_dma, + const u32 *id) { return 0; } From nobody Thu Apr 2 18:32:11 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 558CBC6FA82 for ; Wed, 21 Sep 2022 15:51:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231741AbiIUPvx (ORCPT ); Wed, 21 Sep 2022 11:51:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231419AbiIUPvP (ORCPT ); Wed, 21 Sep 2022 11:51:15 -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 517D09C234; Wed, 21 Sep 2022 08:48:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9A0C163126; Wed, 21 Sep 2022 15:48:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 980AEC433D7; Wed, 21 Sep 2022 15:48:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775330; bh=c05jEFt6CA62YY3uo0SwUTY5l2iuLBFz8UaS0/jF1GA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GWmX+LH2QTCVzLVmpBPMykk2NGZjnP7VY/IJLDLLBgpVhcDxjN4W/QoLuDNeymKW8 FWjfgWce7H3+CffnCV7ri9xmoxuvvgHJQ+a0FcveyLLIjBApcL314KevkFzpI3qeNJ Uy+ZCNRR0DpXFiG0U3on6qbkPB2OJuH9BTBZ6xQY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Paulo Alcantara (SUSE)" , Ronnie Sahlberg , Steve French Subject: [PATCH 5.15 17/45] cifs: revalidate mapping when doing direct writes Date: Wed, 21 Sep 2022 17:46:07 +0200 Message-Id: <20220921153647.454450096@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Ronnie Sahlberg commit 7500a99281dfed2d4a84771c933bcb9e17af279b upstream. Kernel bugzilla: 216301 When doing direct writes we need to also invalidate the mapping in case we have a cached copy of the affected page(s) in memory or else subsequent reads of the data might return the old/stale content before we wrote an update to the server. Cc: stable@vger.kernel.org Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- fs/cifs/file.c | 3 +++ 1 file changed, 3 insertions(+) --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -3318,6 +3318,9 @@ static ssize_t __cifs_writev( =20 ssize_t cifs_direct_writev(struct kiocb *iocb, struct iov_iter *from) { + struct file *file =3D iocb->ki_filp; + + cifs_revalidate_mapping(file->f_inode); return __cifs_writev(iocb, from, true); } From nobody Thu Apr 2 18:32:11 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 E867CC6FA82 for ; Wed, 21 Sep 2022 15:52:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231781AbiIUPwR (ORCPT ); Wed, 21 Sep 2022 11:52:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230326AbiIUPvX (ORCPT ); Wed, 21 Sep 2022 11:51:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D8E5923D0; Wed, 21 Sep 2022 08:49:09 -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 1EC5CB830A7; Wed, 21 Sep 2022 15:48:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6969BC433B5; Wed, 21 Sep 2022 15:48:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775332; bh=VwfPmT+r4JBjMcl3dP6pVX8+6/2Px5nfAtk/MRLgww8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nSoXl7Bsi+4f9pR1REA98wfj7ROAP79zLei+qIidJQTVsdyVZ9qUa2BLEiuk9NIsA kGAW1EsR323VelKRXI3DJgPbYe/ViXpQdtILa+tQ6/KJmVA2sjA/n2DW2CxaFQAzZb i/bF2f4Bi/OHKRE5iuMskaZiup6Q3Cd4qr439ZeU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Metzmacher , Ronnie Sahlberg , "Paulo Alcantara (SUSE)" , Steve French Subject: [PATCH 5.15 18/45] cifs: dont send down the destination address to sendmsg for a SOCK_STREAM Date: Wed, 21 Sep 2022 17:46:08 +0200 Message-Id: <20220921153647.482718063@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Stefan Metzmacher commit 17d3df38dc5f4cec9b0ac6eb79c1859b6e2693a4 upstream. This is ignored anyway by the tcp layer. Signed-off-by: Stefan Metzmacher Cc: stable@vger.kernel.org Reviewed-by: Ronnie Sahlberg Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- fs/cifs/transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -196,8 +196,8 @@ smb_send_kvec(struct TCP_Server_Info *se =20 *sent =3D 0; =20 - smb_msg->msg_name =3D (struct sockaddr *) &server->dstaddr; - smb_msg->msg_namelen =3D sizeof(struct sockaddr); + smb_msg->msg_name =3D NULL; + smb_msg->msg_namelen =3D 0; smb_msg->msg_control =3D NULL; smb_msg->msg_controllen =3D 0; if (server->noblocksnd) From nobody Thu Apr 2 18:32:11 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 78254C6FA82 for ; Wed, 21 Sep 2022 15:52:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231792AbiIUPwX (ORCPT ); Wed, 21 Sep 2022 11:52:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231439AbiIUPvY (ORCPT ); Wed, 21 Sep 2022 11:51:24 -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 88D229E8B3; Wed, 21 Sep 2022 08:49:11 -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 12195B830B0; Wed, 21 Sep 2022 15:48:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63382C433D7; Wed, 21 Sep 2022 15:48:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775335; bh=Dx6WhD+XKC+xohHwOe/Ftp7MR8BKHvhEoM/YvtiAM7A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z82QsV4wdQAyAAw0xRoOzHtH1xVt0miQ145D3gftwaCIJlTIQvuKH5Gp34UprWCon XI0DNDMJh/hwO/TkMMLatT0E9KUuuB4u0GZSD2WI0kFXTs4JWn2u+ERCPnq1Fp40qE Rz4wCCNP1CbjU6luXvbK6xzRnYNW3j0JstOPWsP0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Metzmacher , "Paulo Alcantara (SUSE)" , Ronnie Sahlberg , Steve French Subject: [PATCH 5.15 19/45] cifs: always initialize struct msghdr smb_msg completely Date: Wed, 21 Sep 2022 17:46:09 +0200 Message-Id: <20220921153647.511044620@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Stefan Metzmacher commit bedc8f76b3539ac4f952114b316bcc2251e808ce upstream. So far we were just lucky because the uninitialized members of struct msghdr are not used by default on a SOCK_STREAM tcp socket. But as new things like msg_ubuf and sg_from_iter where added recently, we should play on the safe side and avoid potention problems in future. Signed-off-by: Stefan Metzmacher Cc: stable@vger.kernel.org Reviewed-by: Paulo Alcantara (SUSE) Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- fs/cifs/connect.c | 11 +++-------- fs/cifs/transport.c | 6 +----- 2 files changed, 4 insertions(+), 13 deletions(-) --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -519,9 +519,6 @@ cifs_readv_from_socket(struct TCP_Server int length =3D 0; int total_read; =20 - smb_msg->msg_control =3D NULL; - smb_msg->msg_controllen =3D 0; - for (total_read =3D 0; msg_data_left(smb_msg); total_read +=3D length) { try_to_freeze(); =20 @@ -572,7 +569,7 @@ int cifs_read_from_socket(struct TCP_Server_Info *server, char *buf, unsigned int to_read) { - struct msghdr smb_msg; + struct msghdr smb_msg =3D {}; struct kvec iov =3D {.iov_base =3D buf, .iov_len =3D to_read}; iov_iter_kvec(&smb_msg.msg_iter, READ, &iov, 1, to_read); =20 @@ -582,15 +579,13 @@ cifs_read_from_socket(struct TCP_Server_ ssize_t cifs_discard_from_socket(struct TCP_Server_Info *server, size_t to_read) { - struct msghdr smb_msg; + struct msghdr smb_msg =3D {}; =20 /* * iov_iter_discard already sets smb_msg.type and count and iov_offset * and cifs_readv_from_socket sets msg_control and msg_controllen * so little to initialize in struct msghdr */ - smb_msg.msg_name =3D NULL; - smb_msg.msg_namelen =3D 0; iov_iter_discard(&smb_msg.msg_iter, READ, to_read); =20 return cifs_readv_from_socket(server, &smb_msg); @@ -600,7 +595,7 @@ int cifs_read_page_from_socket(struct TCP_Server_Info *server, struct page *pa= ge, unsigned int page_offset, unsigned int to_read) { - struct msghdr smb_msg; + struct msghdr smb_msg =3D {}; struct bio_vec bv =3D { .bv_page =3D page, .bv_len =3D to_read, .bv_offset =3D page_offset}; iov_iter_bvec(&smb_msg.msg_iter, READ, &bv, 1, to_read); --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -196,10 +196,6 @@ smb_send_kvec(struct TCP_Server_Info *se =20 *sent =3D 0; =20 - smb_msg->msg_name =3D NULL; - smb_msg->msg_namelen =3D 0; - smb_msg->msg_control =3D NULL; - smb_msg->msg_controllen =3D 0; if (server->noblocksnd) smb_msg->msg_flags =3D MSG_DONTWAIT + MSG_NOSIGNAL; else @@ -311,7 +307,7 @@ __smb_send_rqst(struct TCP_Server_Info * sigset_t mask, oldmask; size_t total_len =3D 0, sent, size; struct socket *ssocket =3D server->ssocket; - struct msghdr smb_msg; + struct msghdr smb_msg =3D {}; __be32 rfc1002_marker; =20 if (cifs_rdma_enabled(server)) { From nobody Thu Apr 2 18:32:11 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 A5AD9C6FA82 for ; Wed, 21 Sep 2022 15:52:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231705AbiIUPwV (ORCPT ); Wed, 21 Sep 2022 11:52:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229560AbiIUPvY (ORCPT ); Wed, 21 Sep 2022 11:51:24 -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 77DE59E898; Wed, 21 Sep 2022 08:49: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 dfw.source.kernel.org (Postfix) with ESMTPS id 31A0363126; Wed, 21 Sep 2022 15:49:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BB55C433D6; Wed, 21 Sep 2022 15:49:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775341; bh=0yPTIpTxxwGKFlOMHQuBjjuY336cjtNmXXPOR4obSlM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uDso9Ab0f+8G0qQfHeS9PdwaMlfOYVHs4q0PbOg1FtTU2BWf1dp2GQkQdJN2NnXA2 EwGtcmzA11vnMMLfDVlUhukbYwwCnav6wTQ+EduYE3IVmH8NBqoe+p1lSmKPzAGYqI U4iwhq1GFPHsuqUT/Wef/AIybxcxW9DwIGBNDYfw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller Subject: [PATCH 5.15 20/45] parisc: Allow CONFIG_64BIT with ARCH=parisc Date: Wed, 21 Sep 2022 17:46:10 +0200 Message-Id: <20220921153647.540557842@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Helge Deller commit 805ce8614958c925877ba6b6dc26cdf9f8800474 upstream. The previous patch triggered a build failure for the debian kernel, which has CONFIG_64BIT enabled, uses the CROSS_COMPILER environment variable and uses ARCH=3Dparisc to configure the kernel for 64-bit support. This patch weakens the previous patch while keeping the recommended way to configure the kernel with: ARCH=3Dparisc -> build 32-bit kernel ARCH=3Dparisc64 -> build 64-bit kernel while adding the possibility for debian to configure a 64-bit kernel even if ARCH=3Dparisc is set (PA8X00 CPU has to be selected and CONFIG_64BIT needs to be enabled). The downside of this patch is, that we now have a small window open again where people may get it wrong: if they enable CONFIG_64BIT and try to compile with a 32-bit compiler. Fixes: 3dcfb729b5f4 ("parisc: Make CONFIG_64BIT available for ARCH=3Dparisc= 64 only") Signed-off-by: Helge Deller Cc: # 5.15+ Signed-off-by: Greg Kroah-Hartman Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- arch/parisc/Kconfig | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -220,8 +220,18 @@ config MLONGCALLS Enabling this option will probably slow down your kernel. =20 config 64BIT - def_bool "$(ARCH)" =3D "parisc64" + def_bool y if "$(ARCH)" =3D "parisc64" + bool "64-bit kernel" if "$(ARCH)" =3D "parisc" depends on PA8X00 + help + Enable this if you want to support 64bit kernel on PA-RISC platform. + + At the moment, only people willing to use more than 2GB of RAM, + or having a 64bit-only capable PA-RISC machine should say Y here. + + Since there is no 64bit userland on PA-RISC, there is no point to + enable this option otherwise. The 64bit kernel is significantly bigger + and slower than the 32bit one. =20 choice prompt "Kernel page size" From nobody Thu Apr 2 18:32:11 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 6CF9BC6FA8E for ; Wed, 21 Sep 2022 15:54:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231782AbiIUPyk (ORCPT ); Wed, 21 Sep 2022 11:54:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231839AbiIUPxC (ORCPT ); Wed, 21 Sep 2022 11:53:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B8A8857F1; Wed, 21 Sep 2022 08:49:59 -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 A7C356312C; Wed, 21 Sep 2022 15:49:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB8D9C433C1; Wed, 21 Sep 2022 15:49:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775344; bh=O4/u53JHf7gUmkfgGF2w+ePqacS+7zX57PDIn4KdBRQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JlbJqSjRCgIkjlN7ZsxAHlm0XEr0aYj2CeGeei7vnui1CBf8dLOPs/07GmgzxtDsp t+j5lgr1SxtsHTbOHsBd9mWNQrQlRuCLXIzag9caHxSUk2TJeZbCbsR+mQf9MU1NUc fZ5BHjDwaAqRed50u6QMbKuFdYM0OEWW3CxBMwGY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ben Hutchings , Salvatore Bonaccorso , Helge Deller Subject: [PATCH 5.15 21/45] tools/include/uapi: Fix for parisc and xtensa Date: Wed, 21 Sep 2022 17:46:11 +0200 Message-Id: <20220921153647.569014947@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Ben Hutchings commit 95363747a6f39e88a3052fcf6ce6237769495ce0 upstream. tools/include/uapi/asm/errno.h currently attempts to include non-existent arch-specific errno.h header for xtensa. Remove this case so that is used instead, and add the missing arch-specific header for parisc. Signed-off-by: Ben Hutchings Signed-off-by: Salvatore Bonaccorso Cc: # 5.10+ Signed-off-by: Helge Deller Signed-off-by: Greg Kroah-Hartman Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- tools/include/uapi/asm/errno.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/tools/include/uapi/asm/errno.h +++ b/tools/include/uapi/asm/errno.h @@ -9,8 +9,8 @@ #include "../../../arch/alpha/include/uapi/asm/errno.h" #elif defined(__mips__) #include "../../../arch/mips/include/uapi/asm/errno.h" -#elif defined(__xtensa__) -#include "../../../arch/xtensa/include/uapi/asm/errno.h" +#elif defined(__hppa__) +#include "../../../arch/parisc/include/uapi/asm/errno.h" #else #include #endif From nobody Thu Apr 2 18:32:11 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 F158BC6FA82 for ; Wed, 21 Sep 2022 15:53:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231749AbiIUPw6 (ORCPT ); Wed, 21 Sep 2022 11:52:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231720AbiIUPvh (ORCPT ); Wed, 21 Sep 2022 11:51:37 -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 4DE0B339; Wed, 21 Sep 2022 08:49:29 -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 8D6B76313C; Wed, 21 Sep 2022 15:49:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E66CC433D6; Wed, 21 Sep 2022 15:49:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775347; bh=jnrtrwVThl7jBOaHqlfiiHiaXpyyPz87zg3tkY08qJc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VUT3/NW9hmcQAaPJYQhmuVxDuYlXY8yVJZ52Ky8OwUcyYiD3xZJX/rVzHBXSFdA+y eliaU5FURzggPNkgaw+9m5SYwR986RXmFruLIRmUa9F2VpMQw9BH0LPphRvzif5wLA kRaAxz5bvluYyW+KmvrpFlygG7Rl8t1ULB0+OEf8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gustaw Smolarczyk , Lijo Lazar , Alex Deucher Subject: [PATCH 5.15 22/45] drm/amdgpu: Dont enable LTR if not supported Date: Wed, 21 Sep 2022 17:46:12 +0200 Message-Id: <20220921153647.598306582@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Lijo Lazar commit 6c20490663553cd7e07d8de8af482012329ab9d6 upstream. As per PCIE Base Spec r4.0 Section 6.18 'Software must not enable LTR in an Endpoint unless the Root Complex and all intermediate Switches indicate support for LTR.' This fixes the Unsupported Request error reported through AER during ASPM enablement. Link: https://bugzilla.kernel.org/show_bug.cgi?id=3D216455 The error was unnoticed before and got visible because of the commit referenced below. This doesn't fix anything in the commit below, rather fixes the issue in amdgpu exposed by the commit. The reference is only to associate this commit with below one so that both go together. Fixes: 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_= device_capability()") Reported-by: Gustaw Smolarczyk Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 9 ++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) --- a/drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c +++ b/drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c @@ -366,6 +366,7 @@ static void nbio_v2_3_enable_aspm(struct WREG32_PCIE(smnPCIE_LC_CNTL, data); } =20 +#ifdef CONFIG_PCIEASPM static void nbio_v2_3_program_ltr(struct amdgpu_device *adev) { uint32_t def, data; @@ -387,9 +388,11 @@ static void nbio_v2_3_program_ltr(struct if (def !=3D data) WREG32_PCIE(smnBIF_CFG_DEV0_EPF0_DEVICE_CNTL2, data); } +#endif =20 static void nbio_v2_3_program_aspm(struct amdgpu_device *adev) { +#ifdef CONFIG_PCIEASPM uint32_t def, data; =20 def =3D data =3D RREG32_PCIE(smnPCIE_LC_CNTL); @@ -445,7 +448,10 @@ static void nbio_v2_3_program_aspm(struc if (def !=3D data) WREG32_PCIE(smnPCIE_LC_CNTL6, data); =20 - nbio_v2_3_program_ltr(adev); + /* Don't bother about LTR if LTR is not enabled + * in the path */ + if (adev->pdev->ltr_path) + nbio_v2_3_program_ltr(adev); =20 def =3D data =3D RREG32_SOC15(NBIO, 0, mmRCC_BIF_STRAP3); data |=3D 0x5DE0 << RCC_BIF_STRAP3__STRAP_VLINK_ASPM_IDLE_TIMER__SHIFT; @@ -469,6 +475,7 @@ static void nbio_v2_3_program_aspm(struc data &=3D ~PCIE_LC_CNTL3__LC_DSC_DONT_ENTER_L23_AFTER_PME_ACK_MASK; if (def !=3D data) WREG32_PCIE(smnPCIE_LC_CNTL3, data); +#endif } =20 static void nbio_v2_3_apply_lc_spc_mode_wa(struct amdgpu_device *adev) --- a/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c +++ b/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c @@ -278,6 +278,7 @@ static void nbio_v6_1_init_registers(str WREG32_PCIE(smnPCIE_CI_CNTL, data); } =20 +#ifdef CONFIG_PCIEASPM static void nbio_v6_1_program_ltr(struct amdgpu_device *adev) { uint32_t def, data; @@ -299,9 +300,11 @@ static void nbio_v6_1_program_ltr(struct if (def !=3D data) WREG32_PCIE(smnBIF_CFG_DEV0_EPF0_DEVICE_CNTL2, data); } +#endif =20 static void nbio_v6_1_program_aspm(struct amdgpu_device *adev) { +#ifdef CONFIG_PCIEASPM uint32_t def, data; =20 def =3D data =3D RREG32_PCIE(smnPCIE_LC_CNTL); @@ -357,7 +360,10 @@ static void nbio_v6_1_program_aspm(struc if (def !=3D data) WREG32_PCIE(smnPCIE_LC_CNTL6, data); =20 - nbio_v6_1_program_ltr(adev); + /* Don't bother about LTR if LTR is not enabled + * in the path */ + if (adev->pdev->ltr_path) + nbio_v6_1_program_ltr(adev); =20 def =3D data =3D RREG32_PCIE(smnRCC_BIF_STRAP3); data |=3D 0x5DE0 << RCC_BIF_STRAP3__STRAP_VLINK_ASPM_IDLE_TIMER__SHIFT; @@ -381,6 +387,7 @@ static void nbio_v6_1_program_aspm(struc data &=3D ~PCIE_LC_CNTL3__LC_DSC_DONT_ENTER_L23_AFTER_PME_ACK_MASK; if (def !=3D data) WREG32_PCIE(smnPCIE_LC_CNTL3, data); +#endif } =20 const struct amdgpu_nbio_funcs nbio_v6_1_funcs =3D { --- a/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c +++ b/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c @@ -630,6 +630,7 @@ const struct amdgpu_nbio_ras_funcs nbio_ .ras_fini =3D amdgpu_nbio_ras_fini, }; =20 +#ifdef CONFIG_PCIEASPM static void nbio_v7_4_program_ltr(struct amdgpu_device *adev) { uint32_t def, data; @@ -651,9 +652,11 @@ static void nbio_v7_4_program_ltr(struct if (def !=3D data) WREG32_PCIE(smnBIF_CFG_DEV0_EPF0_DEVICE_CNTL2, data); } +#endif =20 static void nbio_v7_4_program_aspm(struct amdgpu_device *adev) { +#ifdef CONFIG_PCIEASPM uint32_t def, data; =20 def =3D data =3D RREG32_PCIE(smnPCIE_LC_CNTL); @@ -709,7 +712,10 @@ static void nbio_v7_4_program_aspm(struc if (def !=3D data) WREG32_PCIE(smnPCIE_LC_CNTL6, data); =20 - nbio_v7_4_program_ltr(adev); + /* Don't bother about LTR if LTR is not enabled + * in the path */ + if (adev->pdev->ltr_path) + nbio_v7_4_program_ltr(adev); =20 def =3D data =3D RREG32_PCIE(smnRCC_BIF_STRAP3); data |=3D 0x5DE0 << RCC_BIF_STRAP3__STRAP_VLINK_ASPM_IDLE_TIMER__SHIFT; @@ -733,6 +739,7 @@ static void nbio_v7_4_program_aspm(struc data &=3D ~PCIE_LC_CNTL3__LC_DSC_DONT_ENTER_L23_AFTER_PME_ACK_MASK; if (def !=3D data) WREG32_PCIE(smnPCIE_LC_CNTL3, data); +#endif } =20 const struct amdgpu_nbio_funcs nbio_v7_4_funcs =3D { From nobody Thu Apr 2 18:32:11 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 DD160C6FA82 for ; Wed, 21 Sep 2022 15:52:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231799AbiIUPw1 (ORCPT ); Wed, 21 Sep 2022 11:52:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231473AbiIUPvY (ORCPT ); Wed, 21 Sep 2022 11:51:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A56D9DFA7; Wed, 21 Sep 2022 08:49:11 -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 E3E3B63138; Wed, 21 Sep 2022 15:49:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DBE2C433C1; Wed, 21 Sep 2022 15:49:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775350; bh=hzxn+xzEEYZOPWUuhUiO8KsgtgtFyXTbGGxBN3MGlGQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1UIMAMRSwLEDzcZm8S+E/34kVKNJs5uspH9a++Yg0bXj1K+WWEEd2pffaePXEBRFa A7rPhEvgbJRdvWcpvczDmAcoiVvsRciaVqDpo6GZqDvmHINvYoPMjytfbtQlmWEwil IRbcCdmxAE/EGOaPOy2RHQ1/dS96tHcK0Cm/9lR4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Christian=20K=C3=B6nig?= , Lijo Lazar , Alex Deucher Subject: [PATCH 5.15 23/45] drm/amdgpu: move nbio ih_doorbell_range() into ih code for vega Date: Wed, 21 Sep 2022 17:46:13 +0200 Message-Id: <20220921153647.643011456@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Alex Deucher commit dc1d85cb790f2091eea074cee24a704b2d6c4a06 upstream. This mirrors what we do for other asics and this way we are sure the ih doorbell range is properly initialized. There is a comment about the way doorbells on gfx9 work that requires that they are initialized for other IPs before GFX is initialized. In this case IH is initialized before GFX, so there should be no issue. This is a prerequisite for fixing the Unsupported Request error reported through AER during driver load. Link: https://bugzilla.kernel.org/show_bug.cgi?id=3D216373 The error was unnoticed before and got visible because of the commit referenced below. This doesn't fix anything in the commit below, rather fixes the issue in amdgpu exposed by the commit. The reference is only to associate this commit with below one so that both go together. Fixes: 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_= device_capability()") Acked-by: Christian K=C3=B6nig Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/gpu/drm/amd/amdgpu/soc15.c | 3 --- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) --- a/drivers/gpu/drm/amd/amdgpu/soc15.c +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c @@ -1429,9 +1429,6 @@ static void soc15_doorbell_range_init(st ring->use_doorbell, ring->doorbell_index, adev->doorbell_index.sdma_doorbell_range); } - - adev->nbio.funcs->ih_doorbell_range(adev, adev->irq.ih.use_doorbell, - adev->irq.ih.doorbell_index); } } =20 --- a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c +++ b/drivers/gpu/drm/amd/amdgpu/vega10_ih.c @@ -289,6 +289,10 @@ static int vega10_ih_irq_init(struct amd } } =20 + if (!amdgpu_sriov_vf(adev)) + adev->nbio.funcs->ih_doorbell_range(adev, adev->irq.ih.use_doorbell, + adev->irq.ih.doorbell_index); + pci_set_master(adev->pdev); =20 /* enable interrupts */ --- a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c +++ b/drivers/gpu/drm/amd/amdgpu/vega20_ih.c @@ -340,6 +340,10 @@ static int vega20_ih_irq_init(struct amd } } =20 + if (!amdgpu_sriov_vf(adev)) + adev->nbio.funcs->ih_doorbell_range(adev, adev->irq.ih.use_doorbell, + adev->irq.ih.doorbell_index); + pci_set_master(adev->pdev); =20 /* enable interrupts */ From nobody Thu Apr 2 18:32:11 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 F21AFC6FA8B for ; Wed, 21 Sep 2022 15:55:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231916AbiIUPzL (ORCPT ); Wed, 21 Sep 2022 11:55:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232007AbiIUPxz (ORCPT ); Wed, 21 Sep 2022 11:53:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A72B9F0C6; Wed, 21 Sep 2022 08:50:20 -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 538C6B830A8; Wed, 21 Sep 2022 15:49:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0872C433D6; Wed, 21 Sep 2022 15:49:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775353; bh=AAt8U3nEEEqK3vcBFMpse9zvDo4+DEuCbJMdlNlca+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s4krf1o8JGQrQ/DZbwggikRb0pJRDm9l2lA50Zaq/Cpi/qhqsxy0CoDs0Z596TzNc QMUFAqE+2Kw638tAiUi5LK1mJZxPLgvyit9wTJ6RORfucmqmsPMUaDp3O+5wLHqVpu RDFAnsYhwhJj2HX9WWaSZyHwvV+flEg73tEhjiqM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Christian=20K=C3=B6nig?= , Lijo Lazar , Alex Deucher Subject: [PATCH 5.15 24/45] drm/amdgpu: move nbio sdma_doorbell_range() into sdma code for vega Date: Wed, 21 Sep 2022 17:46:14 +0200 Message-Id: <20220921153647.671726258@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Alex Deucher commit e3163bc8ffdfdb405e10530b140135b2ee487f89 upstream. This mirrors what we do for other asics and this way we are sure the sdma doorbell range is properly initialized. There is a comment about the way doorbells on gfx9 work that requires that they are initialized for other IPs before GFX is initialized. However, the statement says that it applies to multimedia as well, but the VCN code currently initializes doorbells after GFX and there are no known issues there. In my testing at least I don't see any problems on SDMA. This is a prerequisite for fixing the Unsupported Request error reported through AER during driver load. Link: https://bugzilla.kernel.org/show_bug.cgi?id=3D216373 The error was unnoticed before and got visible because of the commit referenced below. This doesn't fix anything in the commit below, rather fixes the issue in amdgpu exposed by the commit. The reference is only to associate this commit with below one so that both go together. Fixes: 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_= device_capability()") Acked-by: Christian K=C3=B6nig Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/soc15.c | 22 ---------------------- 2 files changed, 5 insertions(+), 22 deletions(-) --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c @@ -1507,6 +1507,11 @@ static int sdma_v4_0_start(struct amdgpu WREG32_SDMA(i, mmSDMA0_CNTL, temp); =20 if (!amdgpu_sriov_vf(adev)) { + ring =3D &adev->sdma.instance[i].ring; + adev->nbio.funcs->sdma_doorbell_range(adev, i, + ring->use_doorbell, ring->doorbell_index, + adev->doorbell_index.sdma_doorbell_range); + /* unhalt engine */ temp =3D RREG32_SDMA(i, mmSDMA0_F32_CNTL); temp =3D REG_SET_FIELD(temp, SDMA0_F32_CNTL, HALT, 0); --- a/drivers/gpu/drm/amd/amdgpu/soc15.c +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c @@ -1416,22 +1416,6 @@ static int soc15_common_sw_fini(void *ha return 0; } =20 -static void soc15_doorbell_range_init(struct amdgpu_device *adev) -{ - int i; - struct amdgpu_ring *ring; - - /* sdma/ih doorbell range are programed by hypervisor */ - if (!amdgpu_sriov_vf(adev)) { - for (i =3D 0; i < adev->sdma.num_instances; i++) { - ring =3D &adev->sdma.instance[i].ring; - adev->nbio.funcs->sdma_doorbell_range(adev, i, - ring->use_doorbell, ring->doorbell_index, - adev->doorbell_index.sdma_doorbell_range); - } - } -} - static int soc15_common_hw_init(void *handle) { struct amdgpu_device *adev =3D (struct amdgpu_device *)handle; @@ -1451,12 +1435,6 @@ static int soc15_common_hw_init(void *ha =20 /* enable the doorbell aperture */ soc15_enable_doorbell_aperture(adev, true); - /* HW doorbell routing policy: doorbell writing not - * in SDMA/IH/MM/ACV range will be routed to CP. So - * we need to init SDMA/IH/MM/ACV doorbell range prior - * to CP ip block init and ring test. - */ - soc15_doorbell_range_init(adev); =20 return 0; } From nobody Thu Apr 2 18:32:11 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 34F34C6FA82 for ; Wed, 21 Sep 2022 15:53:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231769AbiIUPxV (ORCPT ); Wed, 21 Sep 2022 11:53:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231765AbiIUPwH (ORCPT ); Wed, 21 Sep 2022 11:52:07 -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 2B9261055E; Wed, 21 Sep 2022 08:49:38 -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 40BEDB830A9; Wed, 21 Sep 2022 15:49:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 745A0C433D6; Wed, 21 Sep 2022 15:49:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775355; bh=gpGbiPYmFVOo/lLFhBYn1vWhkcCQKUcxoGDoaiLWFy4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lx4N+nvoKMU4TSaadfBiXdkBTS02UyS0zPsBpRcyGA2keKZ2sMNjkMGHsqmr1ThJf 2FSCG8R1MjFbOEtc4BfbrXu+mwqWpEc7W2KMAQPJuLsAWXfj8kcMVM4Ddwp916nUVh I8NDzaCauvuNtuTL7ycIOplwrrka29Bxtlt9JqkM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Liam Howlett , Suren Baghdasaryan , Carlos Llamas Subject: [PATCH 5.15 25/45] binder: remove inaccurate mmap_assert_locked() Date: Wed, 21 Sep 2022 17:46:15 +0200 Message-Id: <20220921153647.712630577@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Carlos Llamas Acquiring the mmap_lock during exit_mmap() was only added recently in v5.17 by commit 64591e8605d6 ("mm: protect free_pgtables with mmap_lock write lock in exit_mmap"). Soon after, asserts for holding this lock were added to the binder_alloc_set_vma() callback by the following two fix commits in mainline: commit b0cab80ecd54 ("android: binder: fix lockdep check on clearing vma") and commit a43cfc87caaf ("android: binder: stop saving a pointer to the VMA"). These two fix commits were picked for stable trees including v5.15 were unfortunately the mmap_lock is not held during exit_mmap() yet and this unmet dependency leads to the following BUG report: ------------[ cut here ]------------ kernel BUG at include/linux/mmap_lock.h:156! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP Modules linked in: CPU: 3 PID: 437 Comm: binder Not tainted 5.15.68 #5 Hardware name: linux,dummy-virt (DT) pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=3D--) pc : binder_alloc_vma_close+0x6c/0x70 lr : binder_alloc_vma_close+0x6c/0x70 sp : ffff800008687a70 x29: ffff800008687a70 x28: ffff02a7ccf89d00 x27: ffff02a7c92f99e8 x26: 000000000000012a x25: ffff02a7c6284740 x24: ffff02a7ccf8a360 x23: ffff02a7c92f9980 x22: 1ffff000010d0f6c x21: ffff02a7c92f99e8 x20: ffff02a7c92f9980 x19: ffff02a7d16b79a8 x18: 0000ffffe1702d20 x17: 3334373239343932 x16: 34206e6163735f74 x15: 78656e5f616d756e x14: 0a30303030303030 x13: 7366666f5f6e6163 x12: ffff60550564a12b x11: 1fffe0550564a12a x10: ffff60550564a12a x9 : dfff800000000000 x8 : ffff02a82b250957 x7 : 0000000000000001 x6 : ffff60550564a12a x5 : ffff02a82b250950 x4 : dfff800000000000 x3 : 0000000000000000 x2 : 0000000000000000 x1 : ffff02a7ccf89d00 x0 : 0000000000000374 Call trace: binder_alloc_vma_close+0x6c/0x70 binder_vma_close+0x38/0xf4 remove_vma+0x4c/0x94 exit_mmap+0x14c/0x2bc __mmput+0x70/0x19c mmput+0x68/0x80 do_exit+0x484/0xeb0 do_group_exit+0x5c/0x100 [...] This patch removes the inaccurate assert specifically from v5.15 since it's the only release with such issue. Note the mmap_lock is technically not needed here as the mm->mm_users has dropped to zero at this point. More context: https://lore.kernel.org/all/YxpQaio7xm3z9TUw@google.com/. Fixes: b0cab80ecd54 ("android: binder: fix lockdep check on clearing vma") Fixes: a43cfc87caaf ("android: binder: stop saving a pointer to the VMA") Cc: Liam Howlett Cc: Suren Baghdasaryan Cc: # v5.15 Signed-off-by: Carlos Llamas Signed-off-by: Greg Kroah-Hartman Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/android/binder_alloc.c | 7 ------- 1 file changed, 7 deletions(-) --- a/drivers/android/binder_alloc.c +++ b/drivers/android/binder_alloc.c @@ -315,16 +315,9 @@ static inline void binder_alloc_set_vma( { unsigned long vm_start =3D 0; =20 - /* - * Allow clearing the vma with holding just the read lock to allow - * munmapping downgrade of the write lock before freeing and closing the - * file using binder_alloc_vma_close(). - */ if (vma) { vm_start =3D vma->vm_start; mmap_assert_write_locked(alloc->vma_vm_mm); - } else { - mmap_assert_locked(alloc->vma_vm_mm); } =20 alloc->vma_addr =3D vm_start; From nobody Thu Apr 2 18:32:11 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 E93FEECAAD8 for ; Wed, 21 Sep 2022 15:56:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231983AbiIUP4k (ORCPT ); Wed, 21 Sep 2022 11:56:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231902AbiIUPzo (ORCPT ); Wed, 21 Sep 2022 11:55:44 -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 B6E229F8D9; Wed, 21 Sep 2022 08:50: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 2B875B8236C; Wed, 21 Sep 2022 15:50:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72D38C433D6; Wed, 21 Sep 2022 15:50:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775440; bh=/svY6D8V5JfD8BnwrmWDILcFtql5BiIckjIaZs3HME4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ELe8M/8FHZbFZ0fwr95mEXt3VyERMCYnKLwcaFzSntitH9pGaTYnD6qhxjB+RHm9v iqnIuEKWTSHmnTv5GMfQidTTwHPzh09FoLsHVLDo78mLBoY185Th2B4BeARQ5lK9sI kWbfMV90RU4a4Wl6Xo7Ub4WT4QGzXl8I7RMExT8A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zheyu Ma , Helge Deller , Stefan Ghinea Subject: [PATCH 5.15 26/45] video: fbdev: i740fb: Error out if pixclock equals zero Date: Wed, 21 Sep 2022 17:46:16 +0200 Message-Id: <20220921153647.748658902@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Zheyu Ma commit 15cf0b82271b1823fb02ab8c377badba614d95d5 upstream. The userspace program could pass any values to the driver through ioctl() interface. If the driver doesn't check the value of 'pixclock', it may cause divide error. Fix this by checking whether 'pixclock' is zero in the function i740fb_check_var(). The following log reveals it: divide error: 0000 [#1] PREEMPT SMP KASAN PTI RIP: 0010:i740fb_decode_var drivers/video/fbdev/i740fb.c:444 [inline] RIP: 0010:i740fb_set_par+0x272f/0x3bb0 drivers/video/fbdev/i740fb.c:739 Call Trace: fb_set_var+0x604/0xeb0 drivers/video/fbdev/core/fbmem.c:1036 do_fb_ioctl+0x234/0x670 drivers/video/fbdev/core/fbmem.c:1112 fb_ioctl+0xdd/0x130 drivers/video/fbdev/core/fbmem.c:1191 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] Signed-off-by: Zheyu Ma Signed-off-by: Helge Deller Signed-off-by: Stefan Ghinea Signed-off-by: Greg Kroah-Hartman Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/video/fbdev/i740fb.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/video/fbdev/i740fb.c +++ b/drivers/video/fbdev/i740fb.c @@ -662,6 +662,9 @@ static int i740fb_decode_var(const struc =20 static int i740fb_check_var(struct fb_var_screeninfo *var, struct fb_info = *info) { + if (!var->pixclock) + return -EINVAL; + switch (var->bits_per_pixel) { case 8: var->red.offset =3D var->green.offset =3D var->blue.offset =3D 0; From nobody Thu Apr 2 18:32:11 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 C46DDECAAD8 for ; Wed, 21 Sep 2022 15:55:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231907AbiIUPzH (ORCPT ); Wed, 21 Sep 2022 11:55:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231882AbiIUPxi (ORCPT ); Wed, 21 Sep 2022 11:53:38 -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 559D67C321; Wed, 21 Sep 2022 08:50:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3E87CB82714; Wed, 21 Sep 2022 15:49:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 999B7C433C1; Wed, 21 Sep 2022 15:49:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775383; bh=3brTycJ0De2vAzvXgwladuUXsxgrLWMn0uEYin+EqgQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GUvw5cBgiMdQJCAr8fQTvv/og0GKS0WX7E741Pjn+vkAfJlrz9KTQuzC+cqHocWyI FWB4rn1Lpa0JCSe4N3EFLF+fnpyz4Qy4Y7xHO8A+DIzjN2B53QV8H1rOAhCKlNSt+X bfOm4WlXoHJW4SUfV/AcSYzXF68+wEXhd0uS7hYg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jassi Brar , Sudeep Holla , Sasha Levin Subject: [PATCH 5.15 27/45] arm64: dts: juno: Add missing MHU secure-irq Date: Wed, 21 Sep 2022 17:46:17 +0200 Message-Id: <20220921153647.784204824@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Jassi Brar [ Upstream commit 422ab8fe15e30066d4c8e236b747c77069bfca45 ] The MHU secure interrupt exists physically but is missing in the DT node. Specify the interrupt in DT node to fix a warning on Arm Juno board: mhu@2b1f0000: interrupts: [[0, 36, 4], [0, 35, 4]] is too short Link: https://lore.kernel.org/r/20220801141005.599258-1-jassisinghbrar@gmai= l.com Signed-off-by: Jassi Brar Signed-off-by: Sudeep Holla Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- arch/arm64/boot/dts/arm/juno-base.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/arm/juno-base.dtsi b/arch/arm64/boot/dts/a= rm/juno-base.dtsi index a2635b14da30..34e5549ea748 100644 --- a/arch/arm64/boot/dts/arm/juno-base.dtsi +++ b/arch/arm64/boot/dts/arm/juno-base.dtsi @@ -26,7 +26,8 @@ compatible =3D "arm,mhu", "arm,primecell"; reg =3D <0x0 0x2b1f0000 0x0 0x1000>; interrupts =3D , - ; + , + ; #mbox-cells =3D <1>; clocks =3D <&soc_refclk100mhz>; clock-names =3D "apb_pclk"; --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 95ACAC6FA82 for ; Wed, 21 Sep 2022 15:58:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231996AbiIUP6B (ORCPT ); Wed, 21 Sep 2022 11:58:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231978AbiIUP5R (ORCPT ); Wed, 21 Sep 2022 11:57:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55BBC9F8E9; Wed, 21 Sep 2022 08:51:20 -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 964996312C; Wed, 21 Sep 2022 15:50:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7480C433D6; Wed, 21 Sep 2022 15:50:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775417; bh=utFwHIqJdYZ7qhbyZT96a3UYn3/Usc38/MsqpTLwb2w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xmNhUkFehN27v8nbhg47zFrhDZo0WrC05cCv8nHu8vqN7prraBqQxw7MyB/z+jv+j yyHhDvc5YiwoJ3V3cgQf0zcvTslo64l2pU34BXN+SyAo5E2B0804S1902dNoMpstWi HxS6KaOmR7zMr8TI9Plfzc28eqw5b7O2GhOF3cFM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai , Mark Brown , Sasha Levin Subject: [PATCH 5.15 28/45] ASoC: nau8824: Fix semaphore unbalance at error paths Date: Wed, 21 Sep 2022 17:46:18 +0200 Message-Id: <20220921153647.820249439@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Takashi Iwai [ Upstream commit 5628560e90395d3812800a8e44a01c32ffa429ec ] The semaphore of nau8824 wasn't properly unlocked at some error handling code paths, hence this may result in the unbalance (and potential lock-up). Fix them to handle the semaphore up properly. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20220823081000.2965-3-tiwai@suse.de Signed-off-by: Mark Brown Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- sound/soc/codecs/nau8824.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/nau8824.c b/sound/soc/codecs/nau8824.c index f7018f2dd21f..27589900f4fb 100644 --- a/sound/soc/codecs/nau8824.c +++ b/sound/soc/codecs/nau8824.c @@ -1042,6 +1042,7 @@ static int nau8824_hw_params(struct snd_pcm_substream= *substream, struct snd_soc_component *component =3D dai->component; struct nau8824 *nau8824 =3D snd_soc_component_get_drvdata(component); unsigned int val_len =3D 0, osr, ctrl_val, bclk_fs, bclk_div; + int err =3D -EINVAL; =20 nau8824_sema_acquire(nau8824, HZ); =20 @@ -1058,7 +1059,7 @@ static int nau8824_hw_params(struct snd_pcm_substream= *substream, osr &=3D NAU8824_DAC_OVERSAMPLE_MASK; if (nau8824_clock_check(nau8824, substream->stream, nau8824->fs, osr)) - return -EINVAL; + goto error; regmap_update_bits(nau8824->regmap, NAU8824_REG_CLK_DIVIDER, NAU8824_CLK_DAC_SRC_MASK, osr_dac_sel[osr].clk_src << NAU8824_CLK_DAC_SRC_SFT); @@ -1068,7 +1069,7 @@ static int nau8824_hw_params(struct snd_pcm_substream= *substream, osr &=3D NAU8824_ADC_SYNC_DOWN_MASK; if (nau8824_clock_check(nau8824, substream->stream, nau8824->fs, osr)) - return -EINVAL; + goto error; regmap_update_bits(nau8824->regmap, NAU8824_REG_CLK_DIVIDER, NAU8824_CLK_ADC_SRC_MASK, osr_adc_sel[osr].clk_src << NAU8824_CLK_ADC_SRC_SFT); @@ -1089,7 +1090,7 @@ static int nau8824_hw_params(struct snd_pcm_substream= *substream, else if (bclk_fs <=3D 256) bclk_div =3D 0; else - return -EINVAL; + goto error; regmap_update_bits(nau8824->regmap, NAU8824_REG_PORT0_I2S_PCM_CTRL_2, NAU8824_I2S_LRC_DIV_MASK | NAU8824_I2S_BLK_DIV_MASK, @@ -1110,15 +1111,17 @@ static int nau8824_hw_params(struct snd_pcm_substre= am *substream, val_len |=3D NAU8824_I2S_DL_32; break; default: - return -EINVAL; + goto error; } =20 regmap_update_bits(nau8824->regmap, NAU8824_REG_PORT0_I2S_PCM_CTRL_1, NAU8824_I2S_DL_MASK, val_len); + err =3D 0; =20 + error: nau8824_sema_release(nau8824); =20 - return 0; + return err; } =20 static int nau8824_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) @@ -1127,8 +1130,6 @@ static int nau8824_set_fmt(struct snd_soc_dai *dai, u= nsigned int fmt) struct nau8824 *nau8824 =3D snd_soc_component_get_drvdata(component); unsigned int ctrl1_val =3D 0, ctrl2_val =3D 0; =20 - nau8824_sema_acquire(nau8824, HZ); - switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBM_CFM: ctrl2_val |=3D NAU8824_I2S_MS_MASTER; @@ -1170,6 +1171,8 @@ static int nau8824_set_fmt(struct snd_soc_dai *dai, u= nsigned int fmt) return -EINVAL; } =20 + nau8824_sema_acquire(nau8824, HZ); + regmap_update_bits(nau8824->regmap, NAU8824_REG_PORT0_I2S_PCM_CTRL_1, NAU8824_I2S_DF_MASK | NAU8824_I2S_BP_MASK | NAU8824_I2S_PCMB_EN, ctrl1_val); --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 10665ECAAD8 for ; Wed, 21 Sep 2022 15:57:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232096AbiIUP5f (ORCPT ); Wed, 21 Sep 2022 11:57:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231696AbiIUP44 (ORCPT ); Wed, 21 Sep 2022 11:56: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 0A5F19FAA4; Wed, 21 Sep 2022 08:51:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7C2E5B830BC; Wed, 21 Sep 2022 15:50:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6046C433D7; Wed, 21 Sep 2022 15:50:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775420; bh=zBQxvedSZUovFjtcv41m8uKjwpkUHyDD8F8y2WLphzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OBbjpbVOjDaTBZkiL7ZCo+0Udhy+uLcQVThqWwlxIR1+a6fokVd6YI8f6PkladiEK 5amopRcfbSitDsTaoLNgZFudqtGDr4V8HASYtcYrcZrBCU5k+lPZyNQN1L0zpCBs2a hSXDHU0/s9hijPRZWP3wBfLd5w9146yty+jYo7vU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xiaolei Wang , Mark Brown , Sasha Levin Subject: [PATCH 5.15 29/45] regulator: pfuze100: Fix the global-out-of-bounds access in pfuze100_regulator_probe() Date: Wed, 21 Sep 2022 17:46:19 +0200 Message-Id: <20220921153647.853857884@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Xiaolei Wang [ Upstream commit 78e1e867f44e6bdc72c0e6a2609a3407642fb30b ] The pfuze_chip::regulator_descs is an array of size PFUZE100_MAX_REGULATOR, the pfuze_chip::pfuze_regulators is the pointer to the real regulators of a specific device. The number of real regulator is supposed to be less than the PFUZE100_MAX_REGULATOR, so we should use the size of 'regulator_num * sizeof(struct pfuze_regulator)' in memcpy(). This fixes the out of bounds access bug reported by KASAN. Signed-off-by: Xiaolei Wang Link: https://lore.kernel.org/r/20220825111922.1368055-1-xiaolei.wang@windr= iver.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/regulator/pfuze100-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfu= ze100-regulator.c index aa55cfca9e40..a9a0bd918d1e 100644 --- a/drivers/regulator/pfuze100-regulator.c +++ b/drivers/regulator/pfuze100-regulator.c @@ -763,7 +763,7 @@ static int pfuze100_regulator_probe(struct i2c_client *= client, ((pfuze_chip->chip_id =3D=3D PFUZE3000) ? "3000" : "3001")))); =20 memcpy(pfuze_chip->regulator_descs, pfuze_chip->pfuze_regulators, - sizeof(pfuze_chip->regulator_descs)); + regulator_num * sizeof(struct pfuze_regulator)); =20 ret =3D pfuze_parse_regulators_dt(pfuze_chip); if (ret) --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 BDFC2C6FA82 for ; Wed, 21 Sep 2022 15:57:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231998AbiIUP5G (ORCPT ); Wed, 21 Sep 2022 11:57:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231931AbiIUP4X (ORCPT ); Wed, 21 Sep 2022 11:56: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 0A3969FA94; Wed, 21 Sep 2022 08:51:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id ADAEC63138; Wed, 21 Sep 2022 15:50:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9ED57C433C1; Wed, 21 Sep 2022 15:50:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775423; bh=IsyHi3wSqK4hM1NhPP/hH6CMqg72K/1A8UFLZTLCdAQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WDSQ4YQpCEaL4yjkSgEVGdH2xUK7hp2gkFRCnN/sxg7jurXzDL7jvfg95gmBxm7YG 7J5KvqABmEDwoNQPU7EnDabpqbG5pbqW7KxMMhF8GmnANbOOx6Q2jf9LuCODIWRHFo N3MoVI31idmYvR0hKbwVHNnLGAyd8PiM9ItgBH1g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, James Smart , Hannes Reinecke , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.15 30/45] scsi: lpfc: Return DID_TRANSPORT_DISRUPTED instead of DID_REQUEUE Date: Wed, 21 Sep 2022 17:46:20 +0200 Message-Id: <20220921153647.883050090@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Hannes Reinecke [ Upstream commit c0a50cd389c3ed54831e240023dd12bafa56b3a6 ] When the driver hits an internal error condition returning DID_REQUEUE the I/O will be retried on the same ITL nexus. This will inhibit multipathing, resulting in endless retries even if the error could have been resolved by using a different ITL nexus. Return DID_TRANSPORT_DISRUPTED to allow for multipath to engage and route I/O to another ITL nexus. Link: https://lore.kernel.org/r/20220824060033.138661-1-hare@suse.de Reviewed-by: James Smart Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/scsi/lpfc/lpfc_scsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 7da8e4c845df..41313fcaf84a 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -4278,7 +4278,7 @@ lpfc_fcp_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struc= t lpfc_iocbq *pwqeIn, lpfc_cmd->result =3D=3D IOERR_NO_RESOURCES || lpfc_cmd->result =3D=3D IOERR_ABORT_REQUESTED || lpfc_cmd->result =3D=3D IOERR_SLER_CMD_RCV_FAILURE) { - cmd->result =3D DID_REQUEUE << 16; + cmd->result =3D DID_TRANSPORT_DISRUPTED << 16; break; } if ((lpfc_cmd->result =3D=3D IOERR_RX_DMA_FAILED || @@ -4567,7 +4567,7 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct= lpfc_iocbq *pIocbIn, lpfc_cmd->result =3D=3D IOERR_NO_RESOURCES || lpfc_cmd->result =3D=3D IOERR_ABORT_REQUESTED || lpfc_cmd->result =3D=3D IOERR_SLER_CMD_RCV_FAILURE) { - cmd->result =3D DID_REQUEUE << 16; + cmd->result =3D DID_TRANSPORT_DISRUPTED << 16; break; } if ((lpfc_cmd->result =3D=3D IOERR_RX_DMA_FAILED || --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 A63BAC6FA82 for ; Wed, 21 Sep 2022 15:57:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232055AbiIUP5a (ORCPT ); Wed, 21 Sep 2022 11:57:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232030AbiIUP4v (ORCPT ); Wed, 21 Sep 2022 11:56:51 -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 7A1A89F8DC; Wed, 21 Sep 2022 08:51:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 555A9B830BE; Wed, 21 Sep 2022 15:50:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97098C433B5; Wed, 21 Sep 2022 15:50:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775426; bh=VFkvvxFCc18O/kmq1Jd3OItHZjzJyz5jqz9K3qY0pVU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QnYaTL4Eplhn3BBhykdATptGi4DHYkGOvDm3xiJSX7O7g6Xa3JcrG07xNSyor3wQG t8nkxisOgFSJzQJ2PlIXNAc0xZlvGOhBzHckjmypk3oK99RaJTiaG+Xm6N6Dzts3IJ IpLGlxHBfqSSoXJCcVkRYkheeeCRKScq1pzGzlgU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Howells , Sasha Levin Subject: [PATCH 5.15 31/45] rxrpc: Fix local destruction being repeated Date: Wed, 21 Sep 2022 17:46:21 +0200 Message-Id: <20220921153647.920686447@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: David Howells [ Upstream commit d3d863036d688313f8d566b87acd7d99daf82749 ] If the local processor work item for the rxrpc local endpoint gets requeued by an event (such as an incoming packet) between it getting scheduled for destruction and the UDP socket being closed, the rxrpc_local_destroyer() function can get run twice. The second time it can hang because it can end up waiting for cleanup events that will never happen. Signed-off-by: David Howells Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- net/rxrpc/local_object.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c index ef43fe8bdd2f..1d15940f61d7 100644 --- a/net/rxrpc/local_object.c +++ b/net/rxrpc/local_object.c @@ -406,6 +406,9 @@ static void rxrpc_local_processor(struct work_struct *w= ork) container_of(work, struct rxrpc_local, processor); bool again; =20 + if (local->dead) + return; + trace_rxrpc_local(local->debug_id, rxrpc_local_processing, atomic_read(&local->usage), NULL); =20 --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 8F664C6FA8B for ; Wed, 21 Sep 2022 15:58:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232134AbiIUP6Q (ORCPT ); Wed, 21 Sep 2022 11:58:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231945AbiIUP5q (ORCPT ); Wed, 21 Sep 2022 11:57:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 207989C200; Wed, 21 Sep 2022 08:51: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 ams.source.kernel.org (Postfix) with ESMTPS id 5B7E2B830BF; Wed, 21 Sep 2022 15:50:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91826C433D7; Wed, 21 Sep 2022 15:50:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775429; bh=w/n5KhdA3MVKZUaifbVJ8pga5w6qC0rPdRyADTfyPrc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cHAH+LYkm3qU0eUOGoWsQJ6B7X33gX2xhCPrGpFxuvSiL0XXIYrSRbK8YsWJKHkUL MwnV8TX65cQUKwMLUDmHJsRhjJp1UZtgi24OSVpawmBEHVNcRvuluShh7p4HtZSjhW GC8ghTFa2NxvxTVgwvvvNGcmzCXnXQRZ5Nl2H7II= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Howells , Sasha Levin Subject: [PATCH 5.15 32/45] rxrpc: Fix calc of resend age Date: Wed, 21 Sep 2022 17:46:22 +0200 Message-Id: <20220921153647.969305485@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: David Howells [ Upstream commit 214a9dc7d852216e83acac7b75bc18f01ce184c2 ] Fix the calculation of the resend age to add a microsecond value as microseconds, not nanoseconds. Signed-off-by: David Howells Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- net/rxrpc/call_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c index f8ecad2b730e..2a93e7b5fbd0 100644 --- a/net/rxrpc/call_event.c +++ b/net/rxrpc/call_event.c @@ -166,7 +166,7 @@ static void rxrpc_resend(struct rxrpc_call *call, unsig= ned long now_j) _enter("{%d,%d}", call->tx_hard_ack, call->tx_top); =20 now =3D ktime_get_real(); - max_age =3D ktime_sub(now, jiffies_to_usecs(call->peer->rto_j)); + max_age =3D ktime_sub_us(now, jiffies_to_usecs(call->peer->rto_j)); =20 spin_lock_bh(&call->lock); =20 --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 584BAC6FA8B for ; Wed, 21 Sep 2022 15:56:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231894AbiIUP4c (ORCPT ); Wed, 21 Sep 2022 11:56:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231956AbiIUPza (ORCPT ); Wed, 21 Sep 2022 11:55:30 -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 D0C879E6A7; Wed, 21 Sep 2022 08:50:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3E765B81F98; Wed, 21 Sep 2022 15:50:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91892C433C1; Wed, 21 Sep 2022 15:50:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775431; bh=WMzitYfYBWadqXg5FMoTpnzZqBxH9vZuDBnwbQfrJ8M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pn5ScKly6wpv5R+z05/7iNiF1nZWs0GutVkKJ6g6Wrkn1lfsA4MylUzr8FAtLi1jG MXFTBzJqehj8vevsOo6dMa2jFZRJqDP0n8zdFVWeaK2hjLwQGwVvgST+eqmEnvEMe6 r3yYksWGNGxAC4sTHRfdJS8f/Hplf/UiOyXhHRe8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Soenke Huster , Johannes Berg , Sasha Levin Subject: [PATCH 5.15 33/45] wifi: mac80211_hwsim: check length for virtio packets Date: Wed, 21 Sep 2022 17:46:23 +0200 Message-Id: <20220921153648.008041129@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Soenke Huster [ Upstream commit 8c0427842aaef161a38ac83b7e8d8fe050b4be04 ] An invalid packet with a length shorter than the specified length in the netlink header can lead to use-after-frees and slab-out-of-bounds in the processing of the netlink attributes, such as the following: BUG: KASAN: slab-out-of-bounds in __nla_validate_parse+0x1258/0x2010 Read of size 2 at addr ffff88800ac7952c by task kworker/0:1/12 Workqueue: events hwsim_virtio_rx_work Call Trace: dump_stack_lvl+0x45/0x5d print_report.cold+0x5e/0x5e5 kasan_report+0xb1/0x1c0 __nla_validate_parse+0x1258/0x2010 __nla_parse+0x22/0x30 hwsim_virtio_handle_cmd.isra.0+0x13f/0x2d0 hwsim_virtio_rx_work+0x1b2/0x370 process_one_work+0x8df/0x1530 worker_thread+0x575/0x11a0 kthread+0x29d/0x340 ret_from_fork+0x22/0x30 Discarding packets with an invalid length solves this. Therefore, skb->len must be set at reception. Change-Id: Ieaeb9a4c62d3beede274881a7c2722c6c6f477b6 Signed-off-by: Soenke Huster Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/net/wireless/mac80211_hwsim.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/m= ac80211_hwsim.c index feddf4045a8c..52a2574b7d13 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -4278,6 +4278,10 @@ static int hwsim_virtio_handle_cmd(struct sk_buff *s= kb) =20 nlh =3D nlmsg_hdr(skb); gnlh =3D nlmsg_data(nlh); + + if (skb->len < nlh->nlmsg_len) + return -EINVAL; + err =3D genlmsg_parse(nlh, &hwsim_genl_family, tb, HWSIM_ATTR_MAX, hwsim_genl_policy, NULL); if (err) { @@ -4320,7 +4324,8 @@ static void hwsim_virtio_rx_work(struct work_struct *= work) spin_unlock_irqrestore(&hwsim_virtio_lock, flags); =20 skb->data =3D skb->head; - skb_set_tail_pointer(skb, len); + skb_reset_tail_pointer(skb); + skb_put(skb, len); hwsim_virtio_handle_cmd(skb); =20 spin_lock_irqsave(&hwsim_virtio_lock, flags); --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 5ED35C6FA8B for ; Wed, 21 Sep 2022 15:58:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232091AbiIUP6J (ORCPT ); Wed, 21 Sep 2022 11:58:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232084AbiIUP5W (ORCPT ); Wed, 21 Sep 2022 11:57:22 -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 912E2A00EF; Wed, 21 Sep 2022 08:51:18 -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 6217A63147; Wed, 21 Sep 2022 15:50:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F490C433D6; Wed, 21 Sep 2022 15:50:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775434; bh=WXVLrfGRe5QvNzOcez1U+LDXGD0N7F9nLG5LSmRaJMY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sL5U63Y+fIRfCNswUQQhoGAvvqnkA/OUzeyV8e4Why8DsLYAlvzTKG74UEhad+mhN t7hXmHw+xBTZ3C+V7lHdnCKmrCXsI2wGsnwRCSPGudDswgpEbX5OEI8oic6jdjqmqV 2fL06PFSP29dBBVuUTSwfE6O6e35Za55fK0MZ3gQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai , Sasha Levin Subject: [PATCH 5.15 34/45] ALSA: hda/sigmatel: Keep power up while beep is enabled Date: Wed, 21 Sep 2022 17:46:24 +0200 Message-Id: <20220921153648.044362611@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Takashi Iwai [ Upstream commit 414d38ba871092aeac4ed097ac4ced89486646f7 ] It seems that the beep playback doesn't work well on IDT codec devices when the codec auto-pm is enabled. Keep the power on while the beep switch is enabled. Link: https://bugzilla.suse.com/show_bug.cgi?id=3D1200544 Link: https://lore.kernel.org/r/20220904072750.26164-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- sound/pci/hda/patch_sigmatel.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 61df4d33c48f..066bfccd2587 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -209,6 +209,7 @@ struct sigmatel_spec { =20 /* beep widgets */ hda_nid_t anabeep_nid; + bool beep_power_on; =20 /* SPDIF-out mux */ const char * const *spdif_labels; @@ -4443,6 +4444,26 @@ static int stac_suspend(struct hda_codec *codec) =20 return 0; } + +static int stac_check_power_status(struct hda_codec *codec, hda_nid_t nid) +{ + struct sigmatel_spec *spec =3D codec->spec; + int ret =3D snd_hda_gen_check_power_status(codec, nid); + +#ifdef CONFIG_SND_HDA_INPUT_BEEP + if (nid =3D=3D spec->gen.beep_nid && codec->beep) { + if (codec->beep->enabled !=3D spec->beep_power_on) { + spec->beep_power_on =3D codec->beep->enabled; + if (spec->beep_power_on) + snd_hda_power_up_pm(codec); + else + snd_hda_power_down_pm(codec); + } + ret |=3D spec->beep_power_on; + } +#endif + return ret; +} #else #define stac_suspend NULL #endif /* CONFIG_PM */ @@ -4455,6 +4476,7 @@ static const struct hda_codec_ops stac_patch_ops =3D { .unsol_event =3D snd_hda_jack_unsol_event, #ifdef CONFIG_PM .suspend =3D stac_suspend, + .check_power_status =3D stac_check_power_status, #endif }; =20 --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 010ABC6FA8B for ; Wed, 21 Sep 2022 15:56:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232031AbiIUP4v (ORCPT ); Wed, 21 Sep 2022 11:56:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232029AbiIUP4A (ORCPT ); Wed, 21 Sep 2022 11:56:00 -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 C02D69F778; Wed, 21 Sep 2022 08:50: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 3297CB82714; Wed, 21 Sep 2022 15:50:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60F71C433D6; Wed, 21 Sep 2022 15:50:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775437; bh=aejl/wSgMh8SUJ5sgcngytoh6f7XGaSgzCQC5BVcXMk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EkpeyHKkfMaaW8vBhWgx9xVocOBfe/ItSb3chOSclCf2LWJnZQZSIab98rKw2RkH6 z6LgwFbt601O4eR3yZDnDFGJhxwnLXHhTnIZheAxEDSTTXSmxhpiNTdt30SuFxy4XX LVZyLNeEMoPZQULr+j9aAxd/JOB98KgNnmNqf/1g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mohan Kumar , Takashi Iwai , Sasha Levin Subject: [PATCH 5.15 35/45] ALSA: hda/tegra: Align BDL entry to 4KB boundary Date: Wed, 21 Sep 2022 17:46:25 +0200 Message-Id: <20220921153648.082995468@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Mohan Kumar [ Upstream commit 8d44e6044a0e885acdd01813768a0b27906d64fd ] AZA HW may send a burst read/write request crossing 4K memory boundary. The 4KB boundary is not guaranteed by Tegra HDA HW. Make SW change to include the flag AZX_DCAPS_4K_BDLE_BOUNDARY to align BDLE to 4K boundary. Signed-off-by: Mohan Kumar Link: https://lore.kernel.org/r/20220905172420.3801-1-mkumard@nvidia.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- sound/pci/hda/hda_tegra.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c index 773f4903550a..f0e556f2ccf6 100644 --- a/sound/pci/hda/hda_tegra.c +++ b/sound/pci/hda/hda_tegra.c @@ -451,7 +451,8 @@ MODULE_DEVICE_TABLE(of, hda_tegra_match); static int hda_tegra_probe(struct platform_device *pdev) { const unsigned int driver_flags =3D AZX_DCAPS_CORBRP_SELF_CLEAR | - AZX_DCAPS_PM_RUNTIME; + AZX_DCAPS_PM_RUNTIME | + AZX_DCAPS_4K_BDLE_BOUNDARY; struct snd_card *card; struct azx *chip; struct hda_tegra *hda; --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 CE464C6FA82 for ; Wed, 21 Sep 2022 15:53:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231651AbiIUPxb (ORCPT ); Wed, 21 Sep 2022 11:53:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231712AbiIUPwn (ORCPT ); Wed, 21 Sep 2022 11:52:43 -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 412F524BD7; Wed, 21 Sep 2022 08:49:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B346463140; Wed, 21 Sep 2022 15:49:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8B66C433C1; Wed, 21 Sep 2022 15:49:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775386; bh=aOwBMJB92uaFx9EtoIwDREn2p+sT1bcxWiKAUMcNo3s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BrDMNigW+n1UoIwfHyJ6fKebzT6lXywhv/POOUHiqQYBP4Gs5o22HxZMK9eBXmrM7 DrgknDyv9W/R0kNriHeSRYEnuvreQCBvgIWuoKcR1JdK9fvSUWb6WRZAlUzKUgFM9F Q/3vOj6skHhHNbqQu6IBjorP22VzCifRyf2EJ0vI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "jerry.meng" , =?UTF-8?q?Bj=C3=B8rn=20Mork?= , Paolo Abeni , Sasha Levin Subject: [PATCH 5.15 36/45] net: usb: qmi_wwan: add Quectel RM520N Date: Wed, 21 Sep 2022 17:46:26 +0200 Message-Id: <20220921153648.120492746@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: jerry.meng [ Upstream commit e1091e226a2bab4ded1fe26efba2aee1aab06450 ] add support for Quectel RM520N which is based on Qualcomm SDX62 chip. 0x0801: DIAG + NMEA + AT + MODEM + RMNET T: Bus=3D03 Lev=3D01 Prnt=3D01 Port=3D01 Cnt=3D02 Dev#=3D 10 Spd=3D480 Mx= Ch=3D 0 D: Ver=3D 2.10 Cls=3D00(>ifc ) Sub=3D00 Prot=3D00 MxPS=3D64 #Cfgs=3D 1 P: Vendor=3D2c7c ProdID=3D0801 Rev=3D 5.04 S: Manufacturer=3DQuectel S: Product=3DRM520N-GL S: SerialNumber=3D384af524 C:* #Ifs=3D 5 Cfg#=3D 1 Atr=3Da0 MxPwr=3D500mA I:* If#=3D 0 Alt=3D 0 #EPs=3D 2 Cls=3Dff(vend.) Sub=3Dff Prot=3D30 Driver= =3Doption E: Ad=3D01(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D81(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms I:* If#=3D 1 Alt=3D 0 #EPs=3D 3 Cls=3Dff(vend.) Sub=3D00 Prot=3D40 Driver= =3Doption E: Ad=3D83(I) Atr=3D03(Int.) MxPS=3D 10 Ivl=3D32ms E: Ad=3D82(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D02(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms I:* If#=3D 2 Alt=3D 0 #EPs=3D 3 Cls=3Dff(vend.) Sub=3D00 Prot=3D00 Driver= =3Doption E: Ad=3D85(I) Atr=3D03(Int.) MxPS=3D 10 Ivl=3D32ms E: Ad=3D84(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D03(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms I:* If#=3D 3 Alt=3D 0 #EPs=3D 3 Cls=3Dff(vend.) Sub=3D00 Prot=3D00 Driver= =3Doption E: Ad=3D87(I) Atr=3D03(Int.) MxPS=3D 10 Ivl=3D32ms E: Ad=3D86(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D04(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms I:* If#=3D 4 Alt=3D 0 #EPs=3D 3 Cls=3Dff(vend.) Sub=3Dff Prot=3Dff Driver= =3Dqmi_wwan E: Ad=3D88(I) Atr=3D03(Int.) MxPS=3D 8 Ivl=3D32ms E: Ad=3D8e(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D0f(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms Signed-off-by: jerry.meng Acked-by: Bj=C3=B8rn Mork Link: https://lore.kernel.org/r/tencent_E50CA8A206904897C2D20DDAE90731183C0= 5@qq.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 3e1aab1e894e..15c90441285c 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -1085,6 +1085,7 @@ static const struct usb_device_id products[] =3D { {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0512)}, /* Quectel EG12/EM12 */ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0620)}, /* Quectel EM160R-GL */ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0800)}, /* Quectel RM500Q-GL */ + {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0801)}, /* Quectel RM520N */ =20 /* 3. Combined interface devices matching on interface number */ {QMI_FIXED_INTF(0x0408, 0xea42, 4)}, /* Yota / Megafon M100-1 */ --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 A51F9C6FA82 for ; Wed, 21 Sep 2022 15:55:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231940AbiIUPzY (ORCPT ); Wed, 21 Sep 2022 11:55:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232024AbiIUPx6 (ORCPT ); Wed, 21 Sep 2022 11:53:58 -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 24A6C9F0CC; Wed, 21 Sep 2022 08:50:21 -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 20EB7B830B0; Wed, 21 Sep 2022 15:49:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B37EC433C1; Wed, 21 Sep 2022 15:49:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775388; bh=yPc3pK4iI9XZPqrYJsZqZ/Zle+cuZos6EuGS3O/unnI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BicASdw+nAqQRLlbp4e8/m79ZcDfIFwduCJpQ/0AUAGIlCwbEHBG1lwCLwZm6wiLl ewMWi17PoHEjaeFfXCRZ4YxTw4vGyrkObMcBIfHFwliG1JIVUnhwYXykwsKsxXa7TN rK2N4+T/vjHO94+nQeZuAPHAaF9FhmptsUGo87qA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Howells , Jeffrey E Altman , Marc Dionne , linux-afs@lists.infradead.org, Linus Torvalds , Sasha Levin Subject: [PATCH 5.15 37/45] afs: Return -EAGAIN, not -EREMOTEIO, when a file already locked Date: Wed, 21 Sep 2022 17:46:27 +0200 Message-Id: <20220921153648.168092526@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: David Howells [ Upstream commit 0066f1b0e27556381402db3ff31f85d2a2265858 ] When trying to get a file lock on an AFS file, the server may return UAEAGAIN to indicate that the lock is already held. This is currently translated by the default path to -EREMOTEIO. Translate it instead to -EAGAIN so that we know we can retry it. Signed-off-by: David Howells Reviewed-by: Jeffrey E Altman cc: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/166075761334.3533338.2591992675160918098.st= git@warthog.procyon.org.uk/ Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- fs/afs/misc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/afs/misc.c b/fs/afs/misc.c index 933e67fcdab1..805328ca5428 100644 --- a/fs/afs/misc.c +++ b/fs/afs/misc.c @@ -69,6 +69,7 @@ int afs_abort_to_error(u32 abort_code) /* Unified AFS error table */ case UAEPERM: return -EPERM; case UAENOENT: return -ENOENT; + case UAEAGAIN: return -EAGAIN; case UAEACCES: return -EACCES; case UAEBUSY: return -EBUSY; case UAEEXIST: return -EEXIST; --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 DA156ECAAD8 for ; Wed, 21 Sep 2022 15:55:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231977AbiIUPze (ORCPT ); Wed, 21 Sep 2022 11:55:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232029AbiIUPx7 (ORCPT ); Wed, 21 Sep 2022 11:53:59 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DD179DF89; Wed, 21 Sep 2022 08:50:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 01C66B830B7; Wed, 21 Sep 2022 15:49:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6632CC433C1; Wed, 21 Sep 2022 15:49:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775391; bh=twmucRWLWBA5JA6EpwBqMb0aNPgZceHCV2b5nbdmFUA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LHHQLoi2delNFp+D+8moE6oM3sKu2HEYPurjjCP/mWaul7A2BffcjLmqcCsmhMddr gSmHoOckrSjdjo8zYuETGz8JoDjOgYdxxhx5LfPTH6NSdzqbctDAj4PlD2+q0hkDAM 228C7vEJBFAnaFxDrBpUOaZsW7UDq34FRSat46Zs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Sverdlin , Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 5.15 38/45] MIPS: OCTEON: irq: Fix octeon_irq_force_ciu_mapping() Date: Wed, 21 Sep 2022 17:46:28 +0200 Message-Id: <20220921153648.216170861@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Alexander Sverdlin [ Upstream commit ba912afbd611d3a5f22af247721a071ad1d5b9e0 ] For irq_domain_associate() to work the virq descriptor has to be pre-allocated in advance. Otherwise the following happens: WARNING: CPU: 0 PID: 0 at .../kernel/irq/irqdomain.c:527 irq_domain_associa= te+0x298/0x2e8 error: virq128 is not allocated Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.19.78-... #1 ... Call Trace: [] show_stack+0x9c/0x130 [] dump_stack+0x90/0xd0 [] __warn+0x118/0x130 [] warn_slowpath_fmt+0x4c/0x70 [] irq_domain_associate+0x298/0x2e8 [] octeon_irq_init_ciu+0x4c8/0x53c [] of_irq_init+0x1e0/0x388 [] init_IRQ+0x4c/0xf4 [] start_kernel+0x404/0x698 Use irq_alloc_desc_at() to avoid the above problem. Signed-off-by: Alexander Sverdlin Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- arch/mips/cavium-octeon/octeon-irq.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon= /octeon-irq.c index be5d4afcd30f..353dfeee0a6d 100644 --- a/arch/mips/cavium-octeon/octeon-irq.c +++ b/arch/mips/cavium-octeon/octeon-irq.c @@ -127,6 +127,16 @@ static void octeon_irq_free_cd(struct irq_domain *d, u= nsigned int irq) static int octeon_irq_force_ciu_mapping(struct irq_domain *domain, int irq, int line, int bit) { + struct device_node *of_node; + int ret; + + of_node =3D irq_domain_get_of_node(domain); + if (!of_node) + return -EINVAL; + ret =3D irq_alloc_desc_at(irq, of_node_to_nid(of_node)); + if (ret < 0) + return ret; + return irq_domain_associate(domain, irq, line << 6 | bit); } =20 --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 49329ECAAD8 for ; Wed, 21 Sep 2022 15:55:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232020AbiIUPzx (ORCPT ); Wed, 21 Sep 2022 11:55:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232077AbiIUPyG (ORCPT ); Wed, 21 Sep 2022 11:54:06 -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 7670F9F1A2; Wed, 21 Sep 2022 08:50:30 -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 29B88B830AC; Wed, 21 Sep 2022 15:49:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78C3FC433C1; Wed, 21 Sep 2022 15:49:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775395; bh=PiPB3YXJpRtdxlglaBYvNy66rA4xrQRCPhLTiCXSEBE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AMH7rJDIBItpqZE/UeszK18UPErmba41DGWxpTJVpxzGqdQFgHhUIfHNWsFcPdJW3 1+6GQKOvnIaGkbOz5ryhCDzEtr2yhILZtNDPyZ+dsGT7CyfA2rHfeOGty2omTyaJQ6 DNYS1Cfouz9yE2bsXJsdSYJxaW2gET+f7sgrkXbg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Viresh Kumar , =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= , Steven Price , Sasha Levin Subject: [PATCH 5.15 39/45] drm/panfrost: devfreq: set opp to the recommended one to configure regulator Date: Wed, 21 Sep 2022 17:46:29 +0200 Message-Id: <20220921153648.265528220@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Cl=C3=A9ment P=C3=A9ron [ Upstream commit d76034a427a2660b080bc155e4fd8f6393eefb48 ] Enabling panfrost GPU OPP with dynamic regulator will make OPP responsible to enable and configure it. Unfortunately OPP configure and enable the regulator when an OPP is asked to be set, which is not the case during panfrost_devfreq_init(). This leave the regulator unconfigured and if no GPU load is triggered, no OPP is asked to be set which make the regulator framework switching it off during regulator_late_cleanup() without noticing and therefore make the board hang as any access to GPU memory space make bus locks up. Call dev_pm_opp_set_opp() with the recommend OPP in panfrost_devfreq_init() to enable the regulator, this will properly configure and enable the regulator and will avoid any switch off by regulator_late_cleanup(). Suggested-by: Viresh Kumar Signed-off-by: Cl=C3=A9ment P=C3=A9ron Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20220906153034.153321-5= -peron.clem@gmail.com Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/= panfrost/panfrost_devfreq.c index 194af7f607a6..be36dd060a2b 100644 --- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c +++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c @@ -132,6 +132,17 @@ int panfrost_devfreq_init(struct panfrost_device *pfde= v) return PTR_ERR(opp); =20 panfrost_devfreq_profile.initial_freq =3D cur_freq; + + /* + * Set the recommend OPP this will enable and configure the regulator + * if any and will avoid a switch off by regulator_late_cleanup() + */ + ret =3D dev_pm_opp_set_opp(dev, opp); + if (ret) { + DRM_DEV_ERROR(dev, "Couldn't set recommended OPP\n"); + return ret; + } + dev_pm_opp_put(opp); =20 /* --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 1CDDDC6FA8E for ; Wed, 21 Sep 2022 15:54:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231876AbiIUPy4 (ORCPT ); Wed, 21 Sep 2022 11:54:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231852AbiIUPxV (ORCPT ); Wed, 21 Sep 2022 11:53:21 -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 14171857E6; Wed, 21 Sep 2022 08:49:58 -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 9D59063138; Wed, 21 Sep 2022 15:49:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A1A0C433B5; Wed, 21 Sep 2022 15:49:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775398; bh=4rwkvD/DNcjNXfcsWGkTsOeqnSDE+8I7hUNF1BK6CT8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MWOoN64xFIIL9y05IuSjqJJK1vr3wdyugDTn6pwhZ2j27iBpy2YK31/UJFpIjyqrq NLvF8OdYo7SuhN8vh6uBdt06n1uQkMYR7DtKUBo1rnR4IVr1rU7AG+FlLV/v44tUdD Tw0RadwH1jsw+29bLYex8KvMG/CTDPn7/sha/css= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Youling Tang , Masahiro Yamada , Sasha Levin Subject: [PATCH 5.15 40/45] mksysmap: Fix the mismatch of L0 symbols in System.map Date: Wed, 21 Sep 2022 17:46:30 +0200 Message-Id: <20220921153648.313428306@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Youling Tang [ Upstream commit c17a2538704f926ee4d167ba625e09b1040d8439 ] When System.map was generated, the kernel used mksysmap to filter the kernel symbols, we need to filter "L0" symbols in LoongArch architecture. $ cat System.map | grep L0 9000000000221540 t L0 The L0 symbol exists in System.map, but not in .tmp_System.map. When "cmp -s System.map .tmp_System.map" will show "Inconsistent kallsyms data" error message in link-vmlinux.sh script. Signed-off-by: Youling Tang Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- scripts/mksysmap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mksysmap b/scripts/mksysmap index 9aa23d15862a..ad8bbc52267d 100755 --- a/scripts/mksysmap +++ b/scripts/mksysmap @@ -41,4 +41,4 @@ # so we just ignore them to let readprofile continue to work. # (At least sparc64 has __crc_ in the middle). =20 -$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( \.L\)' > $2 +$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( \.L\)\|\( = L0\)' > $2 --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 8F5D0C6FA8B for ; Wed, 21 Sep 2022 15:55:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231898AbiIUPzD (ORCPT ); Wed, 21 Sep 2022 11:55:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231862AbiIUPxY (ORCPT ); Wed, 21 Sep 2022 11:53:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 129798307C; Wed, 21 Sep 2022 08:50: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 A641C6312C; Wed, 21 Sep 2022 15:50:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5BA9C433C1; Wed, 21 Sep 2022 15:50:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775401; bh=rOos/ArnyqrU9+/UDMZ/R2BUkprdvSdRzCRG/yD/lQ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0Cnc/yDAV6x9I/TNKo99NviCDlOKCk8jkOgIX++rvztLl1j9UKPup+W3PFP0whtgD 7GQ46Xc2SmaruDiPCmvWXhKZwHdYAQk5HPgY4dJvZsOGa5gl/WIeBCMZc9VX5ChYup SEA2cXD5n5K/BJNYsX4RdNIsjDYty9Bau3vhjxYw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hyunwoo Kim , Helge Deller , Sasha Levin Subject: [PATCH 5.15 41/45] video: fbdev: pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write Date: Wed, 21 Sep 2022 17:46:31 +0200 Message-Id: <20220921153648.362280422@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Hyunwoo Kim [ Upstream commit a09d2d00af53b43c6f11e6ab3cb58443c2cac8a7 ] In pxa3xx_gcu_write, a count parameter of type size_t is passed to words of type int. Then, copy_from_user() may cause a heap overflow because it is u= sed as the third argument of copy_from_user(). Signed-off-by: Hyunwoo Kim Signed-off-by: Helge Deller Signed-off-by: Sasha Levin Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- drivers/video/fbdev/pxa3xx-gcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/pxa3xx-gcu.c b/drivers/video/fbdev/pxa3xx-= gcu.c index 9421d14d0eb0..9e9888e40c57 100644 --- a/drivers/video/fbdev/pxa3xx-gcu.c +++ b/drivers/video/fbdev/pxa3xx-gcu.c @@ -381,7 +381,7 @@ pxa3xx_gcu_write(struct file *file, const char *buff, struct pxa3xx_gcu_batch *buffer; struct pxa3xx_gcu_priv *priv =3D to_pxa3xx_gcu_priv(file); =20 - int words =3D count / 4; + size_t words =3D count / 4; =20 /* Does not need to be atomic. There's a lock in user space, * but anyhow, this is just for statistics. */ --=20 2.35.1 From nobody Thu Apr 2 18:32:11 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 AFEDAC6FA82 for ; Wed, 21 Sep 2022 15:56:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231409AbiIUP4X (ORCPT ); Wed, 21 Sep 2022 11:56:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231802AbiIUPym (ORCPT ); Wed, 21 Sep 2022 11:54:42 -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 255B69F74A; Wed, 21 Sep 2022 08:50: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 59BC8B830A9; Wed, 21 Sep 2022 15:50:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3142C433D7; Wed, 21 Sep 2022 15:50:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775404; bh=5wcpnd2fFHVNfLTOXzF1tU+HPio+ol1f7lC4fqNRIXI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pPxmuKlhg0mSmJewRaVDxPe8V7epWeWetiiowj9ihyQcTjR9Y4y6XVZT686ilblIl QBE03LAPypdxh0ejTsm9slTs7oRV7iQASwLI/3oITc7GwY8cBDqKS6n28eRH3YZ3oN f5QwR6Wbhc/k9JQujk6pnff9L0Q7iHLI+uPavnlw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Maciej=20=C5=BBenczykowski?= , Eric Dumazet , Steffen Klassert , Sehee Lee , Sewook Seo , "David S. Miller" Subject: [PATCH 5.15 42/45] net: Find dst with sks xfrm policy not ctl_sk Date: Wed, 21 Sep 2022 17:46:32 +0200 Message-Id: <20220921153648.413441860@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: sewookseo commit e22aa14866684f77b4f6b6cae98539e520ddb731 upstream. If we set XFRM security policy by calling setsockopt with option IPV6_XFRM_POLICY, the policy will be stored in 'sock_policy' in 'sock' struct. However tcp_v6_send_response doesn't look up dst_entry with the actual socket but looks up with tcp control socket. This may cause a problem that a RST packet is sent without ESP encryption & peer's TCP socket can't receive it. This patch will make the function look up dest_entry with actual socket, if the socket has XFRM policy(sock_policy), so that the TCP response packet via this function can be encrypted, & aligned on the encrypted TCP socket. Tested: We encountered this problem when a TCP socket which is encrypted in ESP transport mode encryption, receives challenge ACK at SYN_SENT state. After receiving challenge ACK, TCP needs to send RST to establish the socket at next SYN try. But the RST was not encrypted & peer TCP socket still remains on ESTABLISHED state. So we verified this with test step as below. [Test step] 1. Making a TCP state mismatch between client(IDLE) & server(ESTABLISHED). 2. Client tries a new connection on the same TCP ports(src & dst). 3. Server will return challenge ACK instead of SYN,ACK. 4. Client will send RST to server to clear the SOCKET. 5. Client will retransmit SYN to server on the same TCP ports. [Expected result] The TCP connection should be established. Cc: Maciej =C5=BBenczykowski Cc: Eric Dumazet Cc: Steffen Klassert Cc: Sehee Lee Signed-off-by: Sewook Seo Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- include/net/xfrm.h | 2 ++ net/ipv4/ip_output.c | 2 +- net/ipv4/tcp_ipv4.c | 2 ++ net/ipv6/tcp_ipv6.c | 5 ++++- 4 files changed, 9 insertions(+), 2 deletions(-) --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -1190,6 +1190,8 @@ int __xfrm_sk_clone_policy(struct sock * =20 static inline int xfrm_sk_clone_policy(struct sock *sk, const struct sock = *osk) { + if (!sk_fullsock(osk)) + return 0; sk->sk_policy[0] =3D NULL; sk->sk_policy[1] =3D NULL; if (unlikely(osk->sk_policy[0] || osk->sk_policy[1])) --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -1704,7 +1704,7 @@ void ip_send_unicast_reply(struct sock * tcp_hdr(skb)->source, tcp_hdr(skb)->dest, arg->uid); security_skb_classify_flow(skb, flowi4_to_flowi_common(&fl4)); - rt =3D ip_route_output_key(net, &fl4); + rt =3D ip_route_output_flow(net, &fl4, sk); if (IS_ERR(rt)) return; =20 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -817,6 +817,7 @@ static void tcp_v4_send_reset(const stru ctl_sk->sk_priority =3D (sk->sk_state =3D=3D TCP_TIME_WAIT) ? inet_twsk(sk)->tw_priority : sk->sk_priority; transmit_time =3D tcp_transmit_time(sk); + xfrm_sk_clone_policy(ctl_sk, sk); } ip_send_unicast_reply(ctl_sk, skb, &TCP_SKB_CB(skb)->header.h4.opt, @@ -825,6 +826,7 @@ static void tcp_v4_send_reset(const stru transmit_time); =20 ctl_sk->sk_mark =3D 0; + xfrm_sk_free_policy(ctl_sk); sock_net_set(ctl_sk, &init_net); __TCP_INC_STATS(net, TCP_MIB_OUTSEGS); __TCP_INC_STATS(net, TCP_MIB_OUTRSTS); --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -1001,7 +1001,10 @@ static void tcp_v6_send_response(const s * Underlying function will use this to retrieve the network * namespace */ - dst =3D ip6_dst_lookup_flow(sock_net(ctl_sk), ctl_sk, &fl6, NULL); + if (sk && sk->sk_state !=3D TCP_TIME_WAIT) + dst =3D ip6_dst_lookup_flow(net, sk, &fl6, NULL); /*sk's xfrm_policy can= be referred*/ + else + dst =3D ip6_dst_lookup_flow(net, ctl_sk, &fl6, NULL); if (!IS_ERR(dst)) { skb_dst_set(buff, dst); ip6_xmit(ctl_sk, buff, &fl6, fl6.flowi6_mark, NULL, From nobody Thu Apr 2 18:32:11 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 DE32AECAAD8 for ; Wed, 21 Sep 2022 15:56:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231970AbiIUP40 (ORCPT ); Wed, 21 Sep 2022 11:56:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231853AbiIUPyx (ORCPT ); Wed, 21 Sep 2022 11: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 42CCF9E0EE; Wed, 21 Sep 2022 08:50: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 ams.source.kernel.org (Postfix) with ESMTPS id 3E42DB830A2; Wed, 21 Sep 2022 15:50:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A65E6C433C1; Wed, 21 Sep 2022 15:50:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775407; bh=6eEkQKJLgf0QFYHU7+/B0jTXNsQeATZHIVOFOiBqHlI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L4pUuRCgD/KS/BIUhYinJ0mE602yljmDto1yzCFjREBtLP8AE5LdJf8GvyZjl9KnZ hEFTckFOo9Pdxy3MUgtTyVL0LuibueLAdVjCEFx5NkLsbeGbz4Umk/MGNWkj8O0hBB 8DcUx5+VGACbF7gJ+95VLYCofGMSKbTMoK7Nlq9w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sean Christpherson , Mingwei Zhang , Paolo Bonzini , Ovidiu Panait Subject: [PATCH 5.15 43/45] KVM: SEV: add cache flush to solve SEV cache incoherency issues Date: Wed, 21 Sep 2022 17:46:33 +0200 Message-Id: <20220921153648.455253868@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Mingwei Zhang commit 683412ccf61294d727ead4a73d97397396e69a6b upstream. Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is malicious/broken and doesn't ensure SEV guest memory is properly pinned and unpinned. Cache coherency is not enforced across the VM boundary in SEV (AMD APM vol.2 Section 15.34.7). Confidential cachelines, generated by confidential VM guests have to be explicitly flushed on the host side. If a memory page containing dirty confidential cachelines was released by VM and reallocated to another user, the cachelines may corrupt the new user at a later time. KVM takes a shortcut by assuming all confidential memory remain pinned until the end of VM lifetime. Therefore, KVM does not flush cache at mmu_notifier invalidation events. Because of this incorrect assumption and the lack of cache flushing, malicous userspace can crash the host kernel: creating a malicious VM and continuously allocates/releases unpinned confidential memory pages when the VM is running. Add cache flush operations to mmu_notifier operations to ensure that any physical memory leaving the guest VM get flushed. In particular, hook mmu_notifier_invalidate_range_start and mmu_notifier_release events and flush cache accordingly. The hook after releasing the mmu lock to avoid contention with other vCPUs. Cc: stable@vger.kernel.org Suggested-by: Sean Christpherson Reported-by: Mingwei Zhang Signed-off-by: Mingwei Zhang Message-Id: <20220421031407.2516575-4-mizhang@google.com> Signed-off-by: Paolo Bonzini [OP: adjusted KVM_X86_OP_OPTIONAL() -> KVM_X86_OP_NULL, applied kvm_arch_guest_memory_reclaimed() call in kvm_set_memslot()] Signed-off-by: Ovidiu Panait Signed-off-by: Greg Kroah-Hartman Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- arch/x86/include/asm/kvm-x86-ops.h | 1 + arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/svm/sev.c | 8 ++++++++ arch/x86/kvm/svm/svm.c | 1 + arch/x86/kvm/svm/svm.h | 2 ++ arch/x86/kvm/x86.c | 5 +++++ include/linux/kvm_host.h | 2 ++ virt/kvm/kvm_main.c | 27 ++++++++++++++++++++++++--- 8 files changed, 44 insertions(+), 3 deletions(-) --- a/arch/x86/include/asm/kvm-x86-ops.h +++ b/arch/x86/include/asm/kvm-x86-ops.h @@ -115,6 +115,7 @@ KVM_X86_OP(enable_smi_window) KVM_X86_OP_NULL(mem_enc_op) KVM_X86_OP_NULL(mem_enc_reg_region) KVM_X86_OP_NULL(mem_enc_unreg_region) +KVM_X86_OP_NULL(guest_memory_reclaimed) KVM_X86_OP(get_msr_feature) KVM_X86_OP(can_emulate_instruction) KVM_X86_OP(apic_init_signal_blocked) --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -1476,6 +1476,7 @@ struct kvm_x86_ops { int (*mem_enc_reg_region)(struct kvm *kvm, struct kvm_enc_region *argp); int (*mem_enc_unreg_region)(struct kvm *kvm, struct kvm_enc_region *argp); int (*vm_copy_enc_context_from)(struct kvm *kvm, unsigned int source_fd); + void (*guest_memory_reclaimed)(struct kvm *kvm); =20 int (*get_msr_feature)(struct kvm_msr_entry *entry); =20 --- a/arch/x86/kvm/svm/sev.c +++ b/arch/x86/kvm/svm/sev.c @@ -2037,6 +2037,14 @@ static void sev_flush_guest_memory(struc wbinvd_on_all_cpus(); } =20 +void sev_guest_memory_reclaimed(struct kvm *kvm) +{ + if (!sev_guest(kvm)) + return; + + wbinvd_on_all_cpus(); +} + void sev_free_vcpu(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm; --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -4678,6 +4678,7 @@ static struct kvm_x86_ops svm_x86_ops __ .mem_enc_op =3D svm_mem_enc_op, .mem_enc_reg_region =3D svm_register_enc_region, .mem_enc_unreg_region =3D svm_unregister_enc_region, + .guest_memory_reclaimed =3D sev_guest_memory_reclaimed, =20 .vm_copy_enc_context_from =3D svm_vm_copy_asid_from, =20 --- a/arch/x86/kvm/svm/svm.h +++ b/arch/x86/kvm/svm/svm.h @@ -555,6 +555,8 @@ int svm_register_enc_region(struct kvm * int svm_unregister_enc_region(struct kvm *kvm, struct kvm_enc_region *range); int svm_vm_copy_asid_from(struct kvm *kvm, unsigned int source_fd); +void sev_guest_memory_reclaimed(struct kvm *kvm); + void pre_sev_run(struct vcpu_svm *svm, int cpu); void __init sev_set_cpu_caps(void); void __init sev_hardware_setup(void); --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -9557,6 +9557,11 @@ void kvm_arch_mmu_notifier_invalidate_ra kvm_make_all_cpus_request(kvm, KVM_REQ_APIC_PAGE_RELOAD); } =20 +void kvm_arch_guest_memory_reclaimed(struct kvm *kvm) +{ + static_call_cond(kvm_x86_guest_memory_reclaimed)(kvm); +} + void kvm_vcpu_reload_apic_access_page(struct kvm_vcpu *vcpu) { if (!lapic_in_kernel(vcpu)) --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -1912,6 +1912,8 @@ static inline long kvm_arch_vcpu_async_i void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm, unsigned long start, unsigned long end); =20 +void kvm_arch_guest_memory_reclaimed(struct kvm *kvm); + #ifdef CONFIG_HAVE_KVM_VCPU_RUN_PID_CHANGE int kvm_arch_vcpu_run_pid_change(struct kvm_vcpu *vcpu); #else --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -162,6 +162,10 @@ __weak void kvm_arch_mmu_notifier_invali { } =20 +__weak void kvm_arch_guest_memory_reclaimed(struct kvm *kvm) +{ +} + bool kvm_is_zone_device_pfn(kvm_pfn_t pfn) { /* @@ -353,6 +357,12 @@ void kvm_reload_remote_mmus(struct kvm * kvm_make_all_cpus_request(kvm, KVM_REQ_MMU_RELOAD); } =20 +static void kvm_flush_shadow_all(struct kvm *kvm) +{ + kvm_arch_flush_shadow_all(kvm); + kvm_arch_guest_memory_reclaimed(kvm); +} + #ifdef KVM_ARCH_NR_OBJS_PER_MEMORY_CACHE static inline void *mmu_memory_cache_alloc_obj(struct kvm_mmu_memory_cache= *mc, gfp_t gfp_flags) @@ -469,12 +479,15 @@ typedef bool (*hva_handler_t)(struct kvm typedef void (*on_lock_fn_t)(struct kvm *kvm, unsigned long start, unsigned long end); =20 +typedef void (*on_unlock_fn_t)(struct kvm *kvm); + struct kvm_hva_range { unsigned long start; unsigned long end; pte_t pte; hva_handler_t handler; on_lock_fn_t on_lock; + on_unlock_fn_t on_unlock; bool flush_on_ret; bool may_block; }; @@ -551,8 +564,11 @@ static __always_inline int __kvm_handle_ if (range->flush_on_ret && ret) kvm_flush_remote_tlbs(kvm); =20 - if (locked) + if (locked) { KVM_MMU_UNLOCK(kvm); + if (!IS_KVM_NULL_FN(range->on_unlock)) + range->on_unlock(kvm); + } =20 srcu_read_unlock(&kvm->srcu, idx); =20 @@ -573,6 +589,7 @@ static __always_inline int kvm_handle_hv .pte =3D pte, .handler =3D handler, .on_lock =3D (void *)kvm_null_fn, + .on_unlock =3D (void *)kvm_null_fn, .flush_on_ret =3D true, .may_block =3D false, }; @@ -592,6 +609,7 @@ static __always_inline int kvm_handle_hv .pte =3D __pte(0), .handler =3D handler, .on_lock =3D (void *)kvm_null_fn, + .on_unlock =3D (void *)kvm_null_fn, .flush_on_ret =3D false, .may_block =3D false, }; @@ -660,6 +678,7 @@ static int kvm_mmu_notifier_invalidate_r .pte =3D __pte(0), .handler =3D kvm_unmap_gfn_range, .on_lock =3D kvm_inc_notifier_count, + .on_unlock =3D kvm_arch_guest_memory_reclaimed, .flush_on_ret =3D true, .may_block =3D mmu_notifier_range_blockable(range), }; @@ -711,6 +730,7 @@ static void kvm_mmu_notifier_invalidate_ .pte =3D __pte(0), .handler =3D (void *)kvm_null_fn, .on_lock =3D kvm_dec_notifier_count, + .on_unlock =3D (void *)kvm_null_fn, .flush_on_ret =3D false, .may_block =3D mmu_notifier_range_blockable(range), }; @@ -783,7 +803,7 @@ static void kvm_mmu_notifier_release(str int idx; =20 idx =3D srcu_read_lock(&kvm->srcu); - kvm_arch_flush_shadow_all(kvm); + kvm_flush_shadow_all(kvm); srcu_read_unlock(&kvm->srcu, idx); } =20 @@ -1188,7 +1208,7 @@ static void kvm_destroy_vm(struct kvm *k WARN_ON(rcuwait_active(&kvm->mn_memslots_update_rcuwait)); kvm->mn_active_invalidate_count =3D 0; #else - kvm_arch_flush_shadow_all(kvm); + kvm_flush_shadow_all(kvm); #endif kvm_arch_destroy_vm(kvm); kvm_destroy_devices(kvm); @@ -1588,6 +1608,7 @@ static int kvm_set_memslot(struct kvm *k * - kvm_is_visible_gfn (mmu_check_root) */ kvm_arch_flush_shadow_memslot(kvm, slot); + kvm_arch_guest_memory_reclaimed(kvm); =20 /* Released in install_new_memslots. */ mutex_lock(&kvm->slots_arch_lock); From nobody Thu Apr 2 18:32:11 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 E2104ECAAD8 for ; Wed, 21 Sep 2022 15:57:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231839AbiIUP5A (ORCPT ); Wed, 21 Sep 2022 11:57:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231818AbiIUP4U (ORCPT ); Wed, 21 Sep 2022 11:56:20 -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 491399F8E4; Wed, 21 Sep 2022 08:50:45 -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 3A073B830B8; Wed, 21 Sep 2022 15:50:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8BA77C433C1; Wed, 21 Sep 2022 15:50:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775410; bh=ud/Pi+cuP+gqMTTqZ9ZZDw5VSFtPItKboOPoa5IOVnU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ikJxUniz3960TZOdTismkhNZx9crMzj5ztgS50RpCgitqNE4YAzaxPmdedYz5gP2g d1Vh4wml88ZhL16v+S1c+gM6bsAAOcCnIYxw5GmSoAvnaMLAWex9gh3V72H8J7M9aN Pcywt4V2Lq5chJy//bhU647caVHO9oLw5dyXGhbo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot , Tetsuo Handa , Tejun Heo Subject: [PATCH 5.15 44/45] cgroup: Add missing cpus_read_lock() to cgroup_attach_task_all() Date: Wed, 21 Sep 2022 17:46:34 +0200 Message-Id: <20220921153648.485339644@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Tetsuo Handa commit 43626dade36fa74d3329046f4ae2d7fdefe401c6 upstream. syzbot is hitting percpu_rwsem_assert_held(&cpu_hotplug_lock) warning at cpuset_attach() [1], for commit 4f7e7236435ca0ab ("cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock") missed that cpuset_attach() is also called from cgroup_attach_task_all(). Add cpus_read_lock() like what cgroup_procs_write_start() does. Link: https://syzkaller.appspot.com/bug?extid=3D29d3a3b4d86c8136ad9e [1] Reported-by: syzbot Signed-off-by: Tetsuo Handa Fixes: 4f7e7236435ca0ab ("cgroup: Fix threadgroup_rwsem <-> cpus_read_lock(= ) deadlock") Signed-off-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- kernel/cgroup/cgroup-v1.c | 2 ++ 1 file changed, 2 insertions(+) --- a/kernel/cgroup/cgroup-v1.c +++ b/kernel/cgroup/cgroup-v1.c @@ -59,6 +59,7 @@ int cgroup_attach_task_all(struct task_s int retval =3D 0; =20 mutex_lock(&cgroup_mutex); + cpus_read_lock(); percpu_down_write(&cgroup_threadgroup_rwsem); for_each_root(root) { struct cgroup *from_cgrp; @@ -75,6 +76,7 @@ int cgroup_attach_task_all(struct task_s break; } percpu_up_write(&cgroup_threadgroup_rwsem); + cpus_read_unlock(); mutex_unlock(&cgroup_mutex); =20 return retval; From nobody Thu Apr 2 18:32:11 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 C68BBECAAD8 for ; Wed, 21 Sep 2022 15:57:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231989AbiIUP5U (ORCPT ); Wed, 21 Sep 2022 11:57:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231956AbiIUP4f (ORCPT ); Wed, 21 Sep 2022 11:56:35 -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 687389FA8D; Wed, 21 Sep 2022 08:50:56 -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 B355EB830AE; Wed, 21 Sep 2022 15:50:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F25CCC433C1; Wed, 21 Sep 2022 15:50:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775413; bh=bRmbJyoukGDORNxxyNwdRx9+bZox2KdRIYgPsKDYFUM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2PxqP7/sEcj5KYdEslPMNN/zAVXyPls5V1dK4ob+KALicE+w928SAA3f60Wc37ZXc t/L+tmltTh1zkt4IXL9Tj4a3Fj7xd2QADr5LQhoc218PEt2Z3UgiOE1irM5TOOwWqH 4ttLGzXK3DrFMZ4TP71jpgbCL6V5BkPR0ztaj+Bg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Takashi Iwai Subject: [PATCH 5.15 45/45] ALSA: hda/sigmatel: Fix unused variable warning for beep power change Date: Wed, 21 Sep 2022 17:46:35 +0200 Message-Id: <20220921153648.535357005@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 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: Takashi Iwai commit 51bdc8bb82525cd70feb92279c8b7660ad7948dd upstream. The newly added stac_check_power_status() caused a compile warning when CONFIG_SND_HDA_INPUT_BEEP is disabled. Fix it. Fixes: 414d38ba8710 ("ALSA: hda/sigmatel: Keep power up while beep is enabl= ed") Reported-by: kernel test robot Link: https://lore.kernel.org/r/20220905130630.2845-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman Reported-by: Linux Kernel Functional Testing Tested-by: Bagas Sanjaya Tested-by: Florian Fainelli Tested-by: Ron Economos Tested-by: Shuah Khan Tested-by: Sudip Mukherjee --- sound/pci/hda/patch_sigmatel.c | 2 ++ 1 file changed, 2 insertions(+) --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -4447,7 +4447,9 @@ static int stac_suspend(struct hda_codec =20 static int stac_check_power_status(struct hda_codec *codec, hda_nid_t nid) { +#ifdef CONFIG_SND_HDA_INPUT_BEEP struct sigmatel_spec *spec =3D codec->spec; +#endif int ret =3D snd_hda_gen_check_power_status(codec, nid); =20 #ifdef CONFIG_SND_HDA_INPUT_BEEP