]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Feb 2022 08:13:41 +0000 (09:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Feb 2022 08:13:41 +0000 (09:13 +0100)
added patches:
edac-altera-fix-deferred-probing.patch
edac-xgene-fix-deferred-probing.patch
ext4-fix-error-handling-in-ext4_restore_inline_data.patch

queue-4.14/edac-altera-fix-deferred-probing.patch [new file with mode: 0644]
queue-4.14/edac-xgene-fix-deferred-probing.patch [new file with mode: 0644]
queue-4.14/ext4-fix-error-handling-in-ext4_restore_inline_data.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/edac-altera-fix-deferred-probing.patch b/queue-4.14/edac-altera-fix-deferred-probing.patch
new file mode 100644 (file)
index 0000000..4dd844b
--- /dev/null
@@ -0,0 +1,39 @@
+From 279eb8575fdaa92c314a54c0d583c65e26229107 Mon Sep 17 00:00:00 2001
+From: Sergey Shtylyov <s.shtylyov@omp.ru>
+Date: Mon, 24 Jan 2022 21:55:02 +0300
+Subject: EDAC/altera: Fix deferred probing
+
+From: Sergey Shtylyov <s.shtylyov@omp.ru>
+
+commit 279eb8575fdaa92c314a54c0d583c65e26229107 upstream.
+
+The driver overrides the error codes returned by platform_get_irq() to
+-ENODEV for some strange reason, so if it returns -EPROBE_DEFER, the
+driver will fail the probe permanently instead of the deferred probing.
+Switch to propagating the proper error codes to platform driver code
+upwards.
+
+  [ bp: Massage commit message. ]
+
+Fixes: 71bcada88b0f ("edac: altera: Add Altera SDRAM EDAC support")
+Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
+Signed-off-by: Borislav Petkov <bp@suse.de>
+Acked-by: Dinh Nguyen <dinguyen@kernel.org>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20220124185503.6720-2-s.shtylyov@omp.ru
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/edac/altera_edac.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/edac/altera_edac.c
++++ b/drivers/edac/altera_edac.c
+@@ -357,7 +357,7 @@ static int altr_sdram_probe(struct platf
+       if (irq < 0) {
+               edac_printk(KERN_ERR, EDAC_MC,
+                           "No irq %d in DT\n", irq);
+-              return -ENODEV;
++              return irq;
+       }
+       /* Arria10 has a 2nd IRQ */
diff --git a/queue-4.14/edac-xgene-fix-deferred-probing.patch b/queue-4.14/edac-xgene-fix-deferred-probing.patch
new file mode 100644 (file)
index 0000000..c6db34d
--- /dev/null
@@ -0,0 +1,38 @@
+From dfd0dfb9a7cc04acf93435b440dd34c2ca7b4424 Mon Sep 17 00:00:00 2001
+From: Sergey Shtylyov <s.shtylyov@omp.ru>
+Date: Mon, 24 Jan 2022 21:55:03 +0300
+Subject: EDAC/xgene: Fix deferred probing
+
+From: Sergey Shtylyov <s.shtylyov@omp.ru>
+
+commit dfd0dfb9a7cc04acf93435b440dd34c2ca7b4424 upstream.
+
+The driver overrides error codes returned by platform_get_irq_optional()
+to -EINVAL for some strange reason, so if it returns -EPROBE_DEFER, the
+driver will fail the probe permanently instead of the deferred probing.
+Switch to propagating the proper error codes to platform driver code
+upwards.
+
+  [ bp: Massage commit message. ]
+
+Fixes: 0d4429301c4a ("EDAC: Add APM X-Gene SoC EDAC driver")
+Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
+Signed-off-by: Borislav Petkov <bp@suse.de>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20220124185503.6720-3-s.shtylyov@omp.ru
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/edac/xgene_edac.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/edac/xgene_edac.c
++++ b/drivers/edac/xgene_edac.c
+@@ -1934,7 +1934,7 @@ static int xgene_edac_probe(struct platf
+                       irq = platform_get_irq(pdev, i);
+                       if (irq < 0) {
+                               dev_err(&pdev->dev, "No IRQ resource\n");
+-                              rc = -EINVAL;
++                              rc = irq;
+                               goto out_err;
+                       }
+                       rc = devm_request_irq(&pdev->dev, irq,
diff --git a/queue-4.14/ext4-fix-error-handling-in-ext4_restore_inline_data.patch b/queue-4.14/ext4-fix-error-handling-in-ext4_restore_inline_data.patch
new file mode 100644 (file)
index 0000000..6e240f7
--- /dev/null
@@ -0,0 +1,60 @@
+From 897026aaa73eb2517dfea8d147f20ddb0b813044 Mon Sep 17 00:00:00 2001
+From: Ritesh Harjani <riteshh@linux.ibm.com>
+Date: Mon, 17 Jan 2022 17:41:47 +0530
+Subject: ext4: fix error handling in ext4_restore_inline_data()
+
+From: Ritesh Harjani <riteshh@linux.ibm.com>
+
+commit 897026aaa73eb2517dfea8d147f20ddb0b813044 upstream.
+
+While running "./check -I 200 generic/475" it sometimes gives below
+kernel BUG(). Ideally we should not call ext4_write_inline_data() if
+ext4_create_inline_data() has failed.
+
+<log snip>
+[73131.453234] kernel BUG at fs/ext4/inline.c:223!
+
+<code snip>
+ 212 static void ext4_write_inline_data(struct inode *inode, struct ext4_iloc *iloc,
+ 213                                    void *buffer, loff_t pos, unsigned int len)
+ 214 {
+<...>
+ 223         BUG_ON(!EXT4_I(inode)->i_inline_off);
+ 224         BUG_ON(pos + len > EXT4_I(inode)->i_inline_size);
+
+This patch handles the error and prints out a emergency msg saying potential
+data loss for the given inode (since we couldn't restore the original
+inline_data due to some previous error).
+
+[ 9571.070313] EXT4-fs (dm-0): error restoring inline_data for inode -- potential data loss! (inode 1703982, error -30)
+
+Reported-by: Eric Whitney <enwlinux@gmail.com>
+Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
+Reviewed-by: Jan Kara <jack@suse.cz>
+Link: https://lore.kernel.org/r/9f4cd7dfd54fa58ff27270881823d94ddf78dd07.1642416995.git.riteshh@linux.ibm.com
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Cc: stable@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/ext4/inline.c |   10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+--- a/fs/ext4/inline.c
++++ b/fs/ext4/inline.c
+@@ -1131,7 +1131,15 @@ static void ext4_restore_inline_data(han
+                                    struct ext4_iloc *iloc,
+                                    void *buf, int inline_size)
+ {
+-      ext4_create_inline_data(handle, inode, inline_size);
++      int ret;
++
++      ret = ext4_create_inline_data(handle, inode, inline_size);
++      if (ret) {
++              ext4_msg(inode->i_sb, KERN_EMERG,
++                      "error restoring inline_data for inode -- potential data loss! (inode %lu, error %d)",
++                      inode->i_ino, ret);
++              return;
++      }
+       ext4_write_inline_data(inode, iloc, buf, 0, inline_size);
+       ext4_set_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA);
+ }
index 99edbc9bc41ad22339424d417c889cf229c5eab3..0b477b3719daa114d8333462f854602d3dbc55cc 100644 (file)
@@ -64,3 +64,6 @@ scsi-bnx2fc-make-bnx2fc_recv_frame-mp-safe.patch
 nfsd-nfsd4_setclientid_confirm-mistakenly-expires-confirmed-client.patch
 selftests-futex-use-variable-make-instead-of-make.patch
 rtc-cmos-evaluate-century-appropriate.patch
+edac-altera-fix-deferred-probing.patch
+edac-xgene-fix-deferred-probing.patch
+ext4-fix-error-handling-in-ext4_restore_inline_data.patch