]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Dec 2020 13:31:57 +0000 (14:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Dec 2020 13:31:57 +0000 (14:31 +0100)
added patches:
dm-writecache-remove-bug-and-fail-gracefully-instead.patch
gfs2-check-for-empty-rgrp-tree-in-gfs2_ri_update.patch
i2c-qup-fix-error-return-code-in-qup_i2c_bam_schedule_desc.patch
input-i8042-fix-error-return-code-in-i8042_setup_aux.patch
netfilter-nf_tables-avoid-false-postive-lockdep-splat.patch

queue-4.19/dm-writecache-remove-bug-and-fail-gracefully-instead.patch [new file with mode: 0644]
queue-4.19/gfs2-check-for-empty-rgrp-tree-in-gfs2_ri_update.patch [new file with mode: 0644]
queue-4.19/i2c-qup-fix-error-return-code-in-qup_i2c_bam_schedule_desc.patch [new file with mode: 0644]
queue-4.19/input-i8042-fix-error-return-code-in-i8042_setup_aux.patch [new file with mode: 0644]
queue-4.19/netfilter-nf_tables-avoid-false-postive-lockdep-splat.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/dm-writecache-remove-bug-and-fail-gracefully-instead.patch b/queue-4.19/dm-writecache-remove-bug-and-fail-gracefully-instead.patch
new file mode 100644 (file)
index 0000000..56fee8a
--- /dev/null
@@ -0,0 +1,37 @@
+From 857c4c0a8b2888d806f4308c58f59a6a81a1dee9 Mon Sep 17 00:00:00 2001
+From: Mike Snitzer <snitzer@redhat.com>
+Date: Fri, 13 Nov 2020 14:52:28 -0800
+Subject: dm writecache: remove BUG() and fail gracefully instead
+
+From: Mike Snitzer <snitzer@redhat.com>
+
+commit 857c4c0a8b2888d806f4308c58f59a6a81a1dee9 upstream.
+
+Building on arch/s390/ results in this build error:
+
+cc1: some warnings being treated as errors
+../drivers/md/dm-writecache.c: In function 'persistent_memory_claim':
+../drivers/md/dm-writecache.c:323:1: error: no return statement in function returning non-void [-Werror=return-type]
+
+Fix this by replacing the BUG() with an -EOPNOTSUPP return.
+
+Fixes: 48debafe4f2f ("dm: add writecache target")
+Reported-by: Randy Dunlap <rdunlap@infradead.org>
+Signed-off-by: Mike Snitzer <snitzer@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/dm-writecache.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/md/dm-writecache.c
++++ b/drivers/md/dm-writecache.c
+@@ -318,7 +318,7 @@ err1:
+ #else
+ static int persistent_memory_claim(struct dm_writecache *wc)
+ {
+-      BUG();
++      return -EOPNOTSUPP;
+ }
+ #endif
diff --git a/queue-4.19/gfs2-check-for-empty-rgrp-tree-in-gfs2_ri_update.patch b/queue-4.19/gfs2-check-for-empty-rgrp-tree-in-gfs2_ri_update.patch
new file mode 100644 (file)
index 0000000..9dc5814
--- /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
+@@ -1009,6 +1009,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.19/i2c-qup-fix-error-return-code-in-qup_i2c_bam_schedule_desc.patch b/queue-4.19/i2c-qup-fix-error-return-code-in-qup_i2c_bam_schedule_desc.patch
new file mode 100644 (file)
index 0000000..641a69e
--- /dev/null
@@ -0,0 +1,35 @@
+From e9acf0298c664f825e6f1158f2a97341bf9e03ca Mon Sep 17 00:00:00 2001
+From: Zhihao Cheng <chengzhihao1@huawei.com>
+Date: Mon, 16 Nov 2020 22:10:58 +0800
+Subject: i2c: qup: Fix error return code in qup_i2c_bam_schedule_desc()
+
+From: Zhihao Cheng <chengzhihao1@huawei.com>
+
+commit e9acf0298c664f825e6f1158f2a97341bf9e03ca upstream.
+
+Fix to return the error code from qup_i2c_change_state()
+instaed of 0 in qup_i2c_bam_schedule_desc().
+
+Fixes: fbf9921f8b35d9b2 ("i2c: qup: Fix error handling")
+Reported-by: Hulk Robot <hulkci@huawei.com>
+Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
+Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
+Signed-off-by: Wolfram Sang <wsa@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/i2c/busses/i2c-qup.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/i2c/busses/i2c-qup.c
++++ b/drivers/i2c/busses/i2c-qup.c
+@@ -806,7 +806,8 @@ static int qup_i2c_bam_schedule_desc(str
+       if (ret || qup->bus_err || qup->qup_err) {
+               reinit_completion(&qup->xfer);
+-              if (qup_i2c_change_state(qup, QUP_RUN_STATE)) {
++              ret = qup_i2c_change_state(qup, QUP_RUN_STATE);
++              if (ret) {
+                       dev_err(qup->dev, "change to run state timed out");
+                       goto desc_err;
+               }
diff --git a/queue-4.19/input-i8042-fix-error-return-code-in-i8042_setup_aux.patch b/queue-4.19/input-i8042-fix-error-return-code-in-i8042_setup_aux.patch
new file mode 100644 (file)
index 0000000..e20a0b3
--- /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
+@@ -1472,7 +1472,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;
diff --git a/queue-4.19/netfilter-nf_tables-avoid-false-postive-lockdep-splat.patch b/queue-4.19/netfilter-nf_tables-avoid-false-postive-lockdep-splat.patch
new file mode 100644 (file)
index 0000000..ad97778
--- /dev/null
@@ -0,0 +1,45 @@
+From c0700dfa2cae44c033ed97dade8a2679c7d22a9d Mon Sep 17 00:00:00 2001
+From: Florian Westphal <fw@strlen.de>
+Date: Thu, 19 Nov 2020 16:34:54 +0100
+Subject: netfilter: nf_tables: avoid false-postive lockdep splat
+
+From: Florian Westphal <fw@strlen.de>
+
+commit c0700dfa2cae44c033ed97dade8a2679c7d22a9d upstream.
+
+There are reports wrt lockdep splat in nftables, e.g.:
+------------[ cut here ]------------
+WARNING: CPU: 2 PID: 31416 at net/netfilter/nf_tables_api.c:622
+lockdep_nfnl_nft_mutex_not_held+0x28/0x38 [nf_tables]
+...
+
+These are caused by an earlier, unrelated bug such as a n ABBA deadlock
+in a different subsystem.
+In such an event, lockdep is disabled and lockdep_is_held returns true
+unconditionally.  This then causes the WARN() in nf_tables.
+
+Make the WARN conditional on lockdep still active to avoid this.
+
+Fixes: f102d66b335a417 ("netfilter: nf_tables: use dedicated mutex to guard transactions")
+Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
+Link: https://lore.kernel.org/linux-kselftest/CA+G9fYvFUpODs+NkSYcnwKnXm62tmP=ksLeBPmB+KFrB2rvCtQ@mail.gmail.com/
+Signed-off-by: Florian Westphal <fw@strlen.de>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/netfilter/nf_tables_api.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/net/netfilter/nf_tables_api.c
++++ b/net/netfilter/nf_tables_api.c
+@@ -532,7 +532,8 @@ static void nft_request_module(struct ne
+ static void lockdep_nfnl_nft_mutex_not_held(void)
+ {
+ #ifdef CONFIG_PROVE_LOCKING
+-      WARN_ON_ONCE(lockdep_nfnl_is_held(NFNL_SUBSYS_NFTABLES));
++      if (debug_locks)
++              WARN_ON_ONCE(lockdep_nfnl_is_held(NFNL_SUBSYS_NFTABLES));
+ #endif
+ }
index cbe316c72e693c7a7350b1c61cb5cafc96053fe2..f5008ec3323441d5c6f314f52e681014f4296a09 100644 (file)
@@ -31,3 +31,8 @@ spi-bcm-qspi-fix-use-after-free-on-unbind.patch
 spi-bcm2835-fix-use-after-free-on-unbind.patch
 spi-bcm2835-release-the-dma-channel-if-probe-fails-after-dma_init.patch
 tracing-fix-userstacktrace-option-for-instances.patch
+gfs2-check-for-empty-rgrp-tree-in-gfs2_ri_update.patch
+i2c-qup-fix-error-return-code-in-qup_i2c_bam_schedule_desc.patch
+dm-writecache-remove-bug-and-fail-gracefully-instead.patch
+input-i8042-fix-error-return-code-in-i8042_setup_aux.patch
+netfilter-nf_tables-avoid-false-postive-lockdep-splat.patch