]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Dec 2020 13:31:05 +0000 (14:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Dec 2020 13:31:05 +0000 (14:31 +0100)
added patches:
gfs2-check-for-empty-rgrp-tree-in-gfs2_ri_update.patch
input-i8042-fix-error-return-code-in-i8042_setup_aux.patch

queue-4.4/gfs2-check-for-empty-rgrp-tree-in-gfs2_ri_update.patch [new file with mode: 0644]
queue-4.4/input-i8042-fix-error-return-code-in-i8042_setup_aux.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/gfs2-check-for-empty-rgrp-tree-in-gfs2_ri_update.patch b/queue-4.4/gfs2-check-for-empty-rgrp-tree-in-gfs2_ri_update.patch
new file mode 100644 (file)
index 0000000..15db826
--- /dev/null
@@ -0,0 +1,37 @@
+From 778721510e84209f78e31e2ccb296ae36d623f5e Mon Sep 17 00:00:00 2001
+From: Bob Peterson <rpeterso@redhat.com>
+Date: Tue, 24 Nov 2020 10:44:36 -0500
+Subject: gfs2: check for empty rgrp tree in gfs2_ri_update
+
+From: Bob Peterson <rpeterso@redhat.com>
+
+commit 778721510e84209f78e31e2ccb296ae36d623f5e upstream.
+
+If gfs2 tries to mount a (corrupt) file system that has no resource
+groups it still tries to set preferences on the first one, which causes
+a kernel null pointer dereference. This patch adds a check to function
+gfs2_ri_update so this condition is detected and reported back as an
+error.
+
+Reported-by: syzbot+e3f23ce40269a4c9053a@syzkaller.appspotmail.com
+Signed-off-by: Bob Peterson <rpeterso@redhat.com>
+Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/gfs2/rgrp.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/fs/gfs2/rgrp.c
++++ b/fs/gfs2/rgrp.c
+@@ -1017,6 +1017,10 @@ static int gfs2_ri_update(struct gfs2_in
+       if (error < 0)
+               return error;
++      if (RB_EMPTY_ROOT(&sdp->sd_rindex_tree)) {
++              fs_err(sdp, "no resource groups found in the file system.\n");
++              return -ENOENT;
++      }
+       set_rgrp_preferences(sdp);
+       sdp->sd_rindex_uptodate = 1;
diff --git a/queue-4.4/input-i8042-fix-error-return-code-in-i8042_setup_aux.patch b/queue-4.4/input-i8042-fix-error-return-code-in-i8042_setup_aux.patch
new file mode 100644 (file)
index 0000000..4f8da35
--- /dev/null
@@ -0,0 +1,37 @@
+From 855b69857830f8d918d715014f05e59a3f7491a0 Mon Sep 17 00:00:00 2001
+From: Luo Meng <luomeng12@huawei.com>
+Date: Tue, 24 Nov 2020 17:45:23 -0800
+Subject: Input: i8042 - fix error return code in i8042_setup_aux()
+
+From: Luo Meng <luomeng12@huawei.com>
+
+commit 855b69857830f8d918d715014f05e59a3f7491a0 upstream.
+
+Fix to return a negative error code from the error handling case
+instead of 0 in function i8042_setup_aux(), as done elsewhere in this
+function.
+
+Fixes: f81134163fc7 ("Input: i8042 - use platform_driver_probe")
+Reported-by: Hulk Robot <hulkci@huawei.com>
+Signed-off-by: Luo Meng <luomeng12@huawei.com>
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Link: https://lore.kernel.org/r/20201123133420.4071187-1-luomeng12@huawei.com
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/serio/i8042.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/input/serio/i8042.c
++++ b/drivers/input/serio/i8042.c
+@@ -1456,7 +1456,8 @@ static int __init i8042_setup_aux(void)
+       if (error)
+               goto err_free_ports;
+-      if (aux_enable())
++      error = aux_enable();
++      if (error)
+               goto err_free_irq;
+       i8042_aux_irq_registered = true;
index 29cc3d8f8c2735392966a5cf5afcc8483c622fd8..e99a5466c243db2b46ca7da438a4c3fa579148b8 100644 (file)
@@ -34,3 +34,5 @@ spi-bcm2835-release-the-dma-channel-if-probe-fails-after-dma_init.patch
 tracing-fix-userstacktrace-option-for-instances.patch
 btrfs-cleanup-cow-block-on-error.patch
 mm-userfaultfd-do-not-access-vma-vm_mm-after-calling-handle_userfault.patch
+gfs2-check-for-empty-rgrp-tree-in-gfs2_ri_update.patch
+input-i8042-fix-error-return-code-in-i8042_setup_aux.patch