From: Greg Kroah-Hartman Date: Thu, 13 Jun 2024 11:01:45 +0000 (+0200) Subject: 5.15-stable patches X-Git-Tag: v4.19.316~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9183918a041982b81743eed2876a109b1d8661b3;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: edac-igen6-convert-pcibios_-return-codes-to-errnos.patch nfs-fix-read_plus-when-server-doesn-t-support-op_read_plus.patch nfs-fix-undefined-behavior-in-nfs_block_bits.patch --- diff --git a/queue-5.15/edac-igen6-convert-pcibios_-return-codes-to-errnos.patch b/queue-5.15/edac-igen6-convert-pcibios_-return-codes-to-errnos.patch new file mode 100644 index 00000000000..475d77868ca --- /dev/null +++ b/queue-5.15/edac-igen6-convert-pcibios_-return-codes-to-errnos.patch @@ -0,0 +1,51 @@ +From f8367a74aebf88dc8b58a0db6a6c90b4cb8fc9d3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= +Date: Mon, 27 May 2024 16:22:35 +0300 +Subject: EDAC/igen6: Convert PCIBIOS_* return codes to errnos +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Ilpo Järvinen + +commit f8367a74aebf88dc8b58a0db6a6c90b4cb8fc9d3 upstream. + +errcmd_enable_error_reporting() uses pci_{read,write}_config_word() +that return PCIBIOS_* codes. The return code is then returned all the +way into the probe function igen6_probe() that returns it as is. The +probe functions, however, should return normal errnos. + +Convert PCIBIOS_* returns code using pcibios_err_to_errno() into normal +errno before returning it from errcmd_enable_error_reporting(). + +Fixes: 10590a9d4f23 ("EDAC/igen6: Add EDAC driver for Intel client SoCs using IBECC") +Signed-off-by: Ilpo Järvinen +Signed-off-by: Borislav Petkov (AMD) +Reviewed-by: Qiuxu Zhuo +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20240527132236.13875-2-ilpo.jarvinen@linux.intel.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/edac/igen6_edac.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/edac/igen6_edac.c ++++ b/drivers/edac/igen6_edac.c +@@ -627,7 +627,7 @@ static int errcmd_enable_error_reporting + + rc = pci_read_config_word(imc->pdev, ERRCMD_OFFSET, &errcmd); + if (rc) +- return rc; ++ return pcibios_err_to_errno(rc); + + if (enable) + errcmd |= ERRCMD_CE | ERRSTS_UE; +@@ -636,7 +636,7 @@ static int errcmd_enable_error_reporting + + rc = pci_write_config_word(imc->pdev, ERRCMD_OFFSET, errcmd); + if (rc) +- return rc; ++ return pcibios_err_to_errno(rc); + + return 0; + } diff --git a/queue-5.15/nfs-fix-read_plus-when-server-doesn-t-support-op_read_plus.patch b/queue-5.15/nfs-fix-read_plus-when-server-doesn-t-support-op_read_plus.patch new file mode 100644 index 00000000000..78f30d000b7 --- /dev/null +++ b/queue-5.15/nfs-fix-read_plus-when-server-doesn-t-support-op_read_plus.patch @@ -0,0 +1,41 @@ +From f06d1b10cb016d5aaecdb1804fefca025387bd10 Mon Sep 17 00:00:00 2001 +From: Anna Schumaker +Date: Thu, 25 Apr 2024 16:24:29 -0400 +Subject: NFS: Fix READ_PLUS when server doesn't support OP_READ_PLUS + +From: Anna Schumaker + +commit f06d1b10cb016d5aaecdb1804fefca025387bd10 upstream. + +Olga showed me a case where the client was sending multiple READ_PLUS +calls to the server in parallel, and the server replied +NFS4ERR_OPNOTSUPP to each. The client would fall back to READ for the +first reply, but fail to retry the other calls. + +I fix this by removing the test for NFS_CAP_READ_PLUS in +nfs4_read_plus_not_supported(). This allows us to reschedule any +READ_PLUS call that has a NFS4ERR_OPNOTSUPP return value, even after the +capability has been cleared. + +Reported-by: Olga Kornievskaia +Fixes: c567552612ec ("NFS: Add READ_PLUS data segment support") +Cc: stable@vger.kernel.org # v5.10+ +Signed-off-by: Anna Schumaker +Reviewed-by: Benjamin Coddington +Signed-off-by: Trond Myklebust +Signed-off-by: Greg Kroah-Hartman +--- + fs/nfs/nfs4proc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/nfs/nfs4proc.c ++++ b/fs/nfs/nfs4proc.c +@@ -5421,7 +5421,7 @@ static bool nfs4_read_plus_not_supported + struct rpc_message *msg = &task->tk_msg; + + if (msg->rpc_proc == &nfs4_procedures[NFSPROC4_CLNT_READ_PLUS] && +- server->caps & NFS_CAP_READ_PLUS && task->tk_status == -ENOTSUPP) { ++ task->tk_status == -ENOTSUPP) { + server->caps &= ~NFS_CAP_READ_PLUS; + msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_READ]; + rpc_restart_call_prepare(task); diff --git a/queue-5.15/nfs-fix-undefined-behavior-in-nfs_block_bits.patch b/queue-5.15/nfs-fix-undefined-behavior-in-nfs_block_bits.patch new file mode 100644 index 00000000000..18132c8527a --- /dev/null +++ b/queue-5.15/nfs-fix-undefined-behavior-in-nfs_block_bits.patch @@ -0,0 +1,38 @@ +From 3c0a2e0b0ae661457c8505fecc7be5501aa7a715 Mon Sep 17 00:00:00 2001 +From: Sergey Shtylyov +Date: Fri, 10 May 2024 23:24:04 +0300 +Subject: nfs: fix undefined behavior in nfs_block_bits() + +From: Sergey Shtylyov + +commit 3c0a2e0b0ae661457c8505fecc7be5501aa7a715 upstream. + +Shifting *signed int* typed constant 1 left by 31 bits causes undefined +behavior. Specify the correct *unsigned long* type by using 1UL instead. + +Found by Linux Verification Center (linuxtesting.org) with the Svace static +analysis tool. + +Cc: stable@vger.kernel.org +Signed-off-by: Sergey Shtylyov +Reviewed-by: Benjamin Coddington +Signed-off-by: Trond Myklebust +Signed-off-by: Greg Kroah-Hartman +--- + fs/nfs/internal.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/fs/nfs/internal.h ++++ b/fs/nfs/internal.h +@@ -653,9 +653,9 @@ unsigned long nfs_block_bits(unsigned lo + if ((bsize & (bsize - 1)) || nrbitsp) { + unsigned char nrbits; + +- for (nrbits = 31; nrbits && !(bsize & (1 << nrbits)); nrbits--) ++ for (nrbits = 31; nrbits && !(bsize & (1UL << nrbits)); nrbits--) + ; +- bsize = 1 << nrbits; ++ bsize = 1UL << nrbits; + if (nrbitsp) + *nrbitsp = nrbits; + } diff --git a/queue-5.15/series b/queue-5.15/series index 7fb48279283..13d6ab78ae4 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -396,3 +396,6 @@ s390-ap-fix-crash-in-ap-internal-function-modify_bitmap.patch s390-cpacf-split-and-rework-cpacf-query-functions.patch s390-cpacf-make-use-of-invalid-opcode-produce-a-link-error.patch i3c-master-svc-fix-invalidate-ibi-type-and-miss-call-client-ibi-handler.patch +edac-igen6-convert-pcibios_-return-codes-to-errnos.patch +nfs-fix-undefined-behavior-in-nfs_block_bits.patch +nfs-fix-read_plus-when-server-doesn-t-support-op_read_plus.patch