]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Mar 2019 01:29:52 +0000 (10:29 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Mar 2019 01:29:52 +0000 (10:29 +0900)
added patches:
hang-soft-lockup-in-d_invalidate-with-simultaneous-calls.patch

queue-4.4/hang-soft-lockup-in-d_invalidate-with-simultaneous-calls.patch [new file with mode: 0644]
queue-4.4/mmc-core-don-t-try-to-switch-block-size-for-dual-rate-mode.patch [deleted file]
queue-4.4/series

diff --git a/queue-4.4/hang-soft-lockup-in-d_invalidate-with-simultaneous-calls.patch b/queue-4.4/hang-soft-lockup-in-d_invalidate-with-simultaneous-calls.patch
new file mode 100644 (file)
index 0000000..9f3d81d
--- /dev/null
@@ -0,0 +1,59 @@
+From 81be24d263dbeddaba35827036d6f6787a59c2c3 Mon Sep 17 00:00:00 2001
+From: Al Viro <viro@ZenIV.linux.org.uk>
+Date: Sat, 3 Jun 2017 07:20:09 +0100
+Subject: Hang/soft lockup in d_invalidate with simultaneous calls
+
+From: Al Viro <viro@ZenIV.linux.org.uk>
+
+commit 81be24d263dbeddaba35827036d6f6787a59c2c3 upstream.
+
+It's not hard to trigger a bunch of d_invalidate() on the same
+dentry in parallel.  They end up fighting each other - any
+dentry picked for removal by one will be skipped by the rest
+and we'll go for the next iteration through the entire
+subtree, even if everything is being skipped.  Morevoer, we
+immediately go back to scanning the subtree.  The only thing
+we really need is to dissolve all mounts in the subtree and
+as soon as we've nothing left to do, we can just unhash the
+dentry and bugger off.
+
+Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/dcache.c |   10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+--- a/fs/dcache.c
++++ b/fs/dcache.c
+@@ -1510,7 +1510,7 @@ static void check_and_drop(void *_data)
+ {
+       struct detach_data *data = _data;
+-      if (!data->mountpoint && !data->select.found)
++      if (!data->mountpoint && list_empty(&data->select.dispose))
+               __d_drop(data->select.start);
+ }
+@@ -1552,17 +1552,15 @@ void d_invalidate(struct dentry *dentry)
+               d_walk(dentry, &data, detach_and_collect, check_and_drop);
+-              if (data.select.found)
++              if (!list_empty(&data.select.dispose))
+                       shrink_dentry_list(&data.select.dispose);
++              else if (!data.mountpoint)
++                      return;
+               if (data.mountpoint) {
+                       detach_mounts(data.mountpoint);
+                       dput(data.mountpoint);
+               }
+-
+-              if (!data.mountpoint && !data.select.found)
+-                      break;
+-
+               cond_resched();
+       }
+ }
diff --git a/queue-4.4/mmc-core-don-t-try-to-switch-block-size-for-dual-rate-mode.patch b/queue-4.4/mmc-core-don-t-try-to-switch-block-size-for-dual-rate-mode.patch
deleted file mode 100644 (file)
index f066925..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-From 1712c9373f98ae8ed41599a8d7841a6fba29c264 Mon Sep 17 00:00:00 2001
-From: Ziyuan Xu <xzy.xu@rock-chips.com>
-Date: Wed, 21 Sep 2016 09:43:49 +0800
-Subject: mmc: core: don't try to switch block size for dual rate mode
-
-From: Ziyuan Xu <xzy.xu@rock-chips.com>
-
-commit 1712c9373f98ae8ed41599a8d7841a6fba29c264 upstream.
-
-Per spec, block size should always be 512 bytes for dual rate mode,
-so any attempts to switch the block size under dual rate mode should
-be neglected.
-
-Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
-Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- drivers/mmc/core/core.c |    3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/drivers/mmc/core/core.c
-+++ b/drivers/mmc/core/core.c
-@@ -2406,7 +2406,8 @@ int mmc_set_blocklen(struct mmc_card *ca
- {
-       struct mmc_command cmd = {0};
--      if (mmc_card_blockaddr(card) || mmc_card_ddr52(card))
-+      if (mmc_card_blockaddr(card) || mmc_card_ddr52(card) ||
-+          mmc_card_hs400(card) || mmc_card_hs400es(card))
-               return 0;
-       cmd.opcode = MMC_SET_BLOCKLEN;
index a09d5b8bf54870c6cb273a242f4efd9b15d9f3aa..6bc9378d658832d0c9c36cfc7da95e75d243081a 100644 (file)
@@ -25,6 +25,6 @@ extcon-usb-gpio-don-t-miss-event-during-suspend-resume.patch
 kbuild-setlocalversion-print-error-to-stderr.patch
 usb-gadget-composite-fix-dereference-after-null-check-coverify-warning.patch
 usb-gadget-add-the-gserial-port-checking-in-gs_start_tx.patch
-mmc-core-don-t-try-to-switch-block-size-for-dual-rate-mode.patch
 tcp-dccp-drop-syn-packets-if-accept-queue-is-full.patch
 serial-sprd-adjust-timeout-to-a-big-value.patch
+hang-soft-lockup-in-d_invalidate-with-simultaneous-calls.patch