]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Feb 2019 11:53:30 +0000 (12:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Feb 2019 11:53:30 +0000 (12:53 +0100)
added patches:
arm64-hyp-stub-forbid-kprobing-of-the-hyp-stub.patch
cifs-do-not-count-enodata-as-failure-for-query-directory.patch
fs-dcache-fix-incorrect-nr_dentry_unused-accounting-in-shrink_dcache_sb.patch
gfs2-revert-fix-loop-in-gfs2_rbm_find.patch

queue-3.18/arm64-hyp-stub-forbid-kprobing-of-the-hyp-stub.patch [new file with mode: 0644]
queue-3.18/cifs-do-not-count-enodata-as-failure-for-query-directory.patch [new file with mode: 0644]
queue-3.18/fs-dcache-fix-incorrect-nr_dentry_unused-accounting-in-shrink_dcache_sb.patch [new file with mode: 0644]
queue-3.18/gfs2-revert-fix-loop-in-gfs2_rbm_find.patch [new file with mode: 0644]
queue-3.18/series

diff --git a/queue-3.18/arm64-hyp-stub-forbid-kprobing-of-the-hyp-stub.patch b/queue-3.18/arm64-hyp-stub-forbid-kprobing-of-the-hyp-stub.patch
new file mode 100644 (file)
index 0000000..07895f3
--- /dev/null
@@ -0,0 +1,37 @@
+From 8fac5cbdfe0f01254d9d265c6aa1a95f94f58595 Mon Sep 17 00:00:00 2001
+From: James Morse <james.morse@arm.com>
+Date: Thu, 24 Jan 2019 16:32:56 +0000
+Subject: arm64: hyp-stub: Forbid kprobing of the hyp-stub
+
+From: James Morse <james.morse@arm.com>
+
+commit 8fac5cbdfe0f01254d9d265c6aa1a95f94f58595 upstream.
+
+The hyp-stub is loaded by the kernel's early startup code at EL2
+during boot, before KVM takes ownership later. The hyp-stub's
+text is part of the regular kernel text, meaning it can be kprobed.
+
+A breakpoint in the hyp-stub causes the CPU to spin in el2_sync_invalid.
+
+Add it to the __hyp_text.
+
+Signed-off-by: James Morse <james.morse@arm.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Will Deacon <will.deacon@arm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm64/kernel/hyp-stub.S |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/arm64/kernel/hyp-stub.S
++++ b/arch/arm64/kernel/hyp-stub.S
+@@ -26,6 +26,8 @@
+ #include <asm/virt.h>
+       .text
++      .pushsection    .hyp.text, "ax"
++
+       .align 11
+ ENTRY(__hyp_stub_vectors)
diff --git a/queue-3.18/cifs-do-not-count-enodata-as-failure-for-query-directory.patch b/queue-3.18/cifs-do-not-count-enodata-as-failure-for-query-directory.patch
new file mode 100644 (file)
index 0000000..d5e5a5e
--- /dev/null
@@ -0,0 +1,31 @@
+From 8e6e72aeceaaed5aeeb1cb43d3085de7ceb14f79 Mon Sep 17 00:00:00 2001
+From: Pavel Shilovsky <pshilov@microsoft.com>
+Date: Sat, 26 Jan 2019 12:21:32 -0800
+Subject: CIFS: Do not count -ENODATA as failure for query directory
+
+From: Pavel Shilovsky <pshilov@microsoft.com>
+
+commit 8e6e72aeceaaed5aeeb1cb43d3085de7ceb14f79 upstream.
+
+Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
+Signed-off-by: Steve French <stfrench@microsoft.com>
+CC: Stable <stable@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/cifs/smb2pdu.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/fs/cifs/smb2pdu.c
++++ b/fs/cifs/smb2pdu.c
+@@ -2309,8 +2309,8 @@ SMB2_query_directory(const unsigned int
+               if (rc == -ENODATA && rsp->hdr.Status == STATUS_NO_MORE_FILES) {
+                       srch_inf->endOfSearch = true;
+                       rc = 0;
+-              }
+-              cifs_stats_fail_inc(tcon, SMB2_QUERY_DIRECTORY_HE);
++              } else
++                      cifs_stats_fail_inc(tcon, SMB2_QUERY_DIRECTORY_HE);
+               goto qdir_exit;
+       }
diff --git a/queue-3.18/fs-dcache-fix-incorrect-nr_dentry_unused-accounting-in-shrink_dcache_sb.patch b/queue-3.18/fs-dcache-fix-incorrect-nr_dentry_unused-accounting-in-shrink_dcache_sb.patch
new file mode 100644 (file)
index 0000000..8a424dc
--- /dev/null
@@ -0,0 +1,50 @@
+From 1dbd449c9943e3145148cc893c2461b72ba6fef0 Mon Sep 17 00:00:00 2001
+From: Waiman Long <longman@redhat.com>
+Date: Wed, 30 Jan 2019 13:52:36 -0500
+Subject: fs/dcache: Fix incorrect nr_dentry_unused accounting in shrink_dcache_sb()
+
+From: Waiman Long <longman@redhat.com>
+
+commit 1dbd449c9943e3145148cc893c2461b72ba6fef0 upstream.
+
+The nr_dentry_unused per-cpu counter tracks dentries in both the LRU
+lists and the shrink lists where the DCACHE_LRU_LIST bit is set.
+
+The shrink_dcache_sb() function moves dentries from the LRU list to a
+shrink list and subtracts the dentry count from nr_dentry_unused.  This
+is incorrect as the nr_dentry_unused count will also be decremented in
+shrink_dentry_list() via d_shrink_del().
+
+To fix this double decrement, the decrement in the shrink_dcache_sb()
+function is taken out.
+
+Fixes: 4e717f5c1083 ("list_lru: remove special case function list_lru_dispose_all."
+Cc: stable@kernel.org
+Signed-off-by: Waiman Long <longman@redhat.com>
+Reviewed-by: Dave Chinner <dchinner@redhat.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/dcache.c |    6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+--- a/fs/dcache.c
++++ b/fs/dcache.c
+@@ -1103,15 +1103,11 @@ static enum lru_status dentry_lru_isolat
+  */
+ void shrink_dcache_sb(struct super_block *sb)
+ {
+-      long freed;
+-
+       do {
+               LIST_HEAD(dispose);
+-              freed = list_lru_walk(&sb->s_dentry_lru,
++              list_lru_walk(&sb->s_dentry_lru,
+                       dentry_lru_isolate_shrink, &dispose, 1024);
+-
+-              this_cpu_sub(nr_dentry_unused, freed);
+               shrink_dentry_list(&dispose);
+               cond_resched();
+       } while (list_lru_count(&sb->s_dentry_lru) > 0);
diff --git a/queue-3.18/gfs2-revert-fix-loop-in-gfs2_rbm_find.patch b/queue-3.18/gfs2-revert-fix-loop-in-gfs2_rbm_find.patch
new file mode 100644 (file)
index 0000000..dd4b535
--- /dev/null
@@ -0,0 +1,38 @@
+From e74c98ca2d6ae4376cc15fa2a22483430909d96b Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruenba@redhat.com>
+Date: Wed, 30 Jan 2019 21:30:36 +0100
+Subject: gfs2: Revert "Fix loop in gfs2_rbm_find"
+
+From: Andreas Gruenbacher <agruenba@redhat.com>
+
+commit e74c98ca2d6ae4376cc15fa2a22483430909d96b upstream.
+
+This reverts commit 2d29f6b96d8f80322ed2dd895bca590491c38d34.
+
+It turns out that the fix can lead to a ~20 percent performance regression
+in initial writes to the page cache according to iozone.  Let's revert this
+for now to have more time for a proper fix.
+
+Cc: stable@vger.kernel.org # v3.13+
+Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
+Signed-off-by: Bob Peterson <rpeterso@redhat.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/gfs2/rgrp.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/gfs2/rgrp.c
++++ b/fs/gfs2/rgrp.c
+@@ -1671,9 +1671,9 @@ static int gfs2_rbm_find(struct gfs2_rbm
+                       goto next_iter;
+               }
+               if (ret == -E2BIG) {
+-                      n += rbm->bii - initial_bii;
+                       rbm->bii = 0;
+                       rbm->offset = 0;
++                      n += (rbm->bii - initial_bii);
+                       goto res_covered_end_of_rgrp;
+               }
+               return ret;
index 0e7f0b81c786f4e49e0d5d3f03b60db34e482d32..9e4888f4d31d71f6679fa6ae594683440256839f 100644 (file)
@@ -21,3 +21,7 @@ net-rose-fix-null-ax25_cb-kernel-panic.patch
 ucc_geth-reset-bql-queue-when-stopping-device.patch
 l2tp-remove-l2specific_len-dependency-in-l2tp_core.patch
 l2tp-fix-reading-optional-fields-of-l2tpv3.patch
+cifs-do-not-count-enodata-as-failure-for-query-directory.patch
+fs-dcache-fix-incorrect-nr_dentry_unused-accounting-in-shrink_dcache_sb.patch
+arm64-hyp-stub-forbid-kprobing-of-the-hyp-stub.patch
+gfs2-revert-fix-loop-in-gfs2_rbm_find.patch