]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Jan 2025 13:47:09 +0000 (14:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Jan 2025 13:47:09 +0000 (14:47 +0100)
added patches:
fs-proc-fix-softlockup-in-__read_vmcore-part-2.patch

queue-5.4/fs-proc-fix-softlockup-in-__read_vmcore-part-2.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/fs-proc-fix-softlockup-in-__read_vmcore-part-2.patch b/queue-5.4/fs-proc-fix-softlockup-in-__read_vmcore-part-2.patch
new file mode 100644 (file)
index 0000000..e939a29
--- /dev/null
@@ -0,0 +1,49 @@
+From cbc5dde0a461240046e8a41c43d7c3b76d5db952 Mon Sep 17 00:00:00 2001
+From: Rik van Riel <riel@surriel.com>
+Date: Fri, 10 Jan 2025 10:28:21 -0500
+Subject: fs/proc: fix softlockup in __read_vmcore (part 2)
+
+From: Rik van Riel <riel@surriel.com>
+
+commit cbc5dde0a461240046e8a41c43d7c3b76d5db952 upstream.
+
+Since commit 5cbcb62dddf5 ("fs/proc: fix softlockup in __read_vmcore") the
+number of softlockups in __read_vmcore at kdump time have gone down, but
+they still happen sometimes.
+
+In a memory constrained environment like the kdump image, a softlockup is
+not just a harmless message, but it can interfere with things like RCU
+freeing memory, causing the crashdump to get stuck.
+
+The second loop in __read_vmcore has a lot more opportunities for natural
+sleep points, like scheduling out while waiting for a data write to
+happen, but apparently that is not always enough.
+
+Add a cond_resched() to the second loop in __read_vmcore to (hopefully)
+get rid of the softlockups.
+
+Link: https://lkml.kernel.org/r/20250110102821.2a37581b@fangorn
+Fixes: 5cbcb62dddf5 ("fs/proc: fix softlockup in __read_vmcore")
+Signed-off-by: Rik van Riel <riel@surriel.com>
+Reported-by: Breno Leitao <leitao@debian.org>
+Cc: Baoquan He <bhe@redhat.com>
+Cc: Dave Young <dyoung@redhat.com>
+Cc: Vivek Goyal <vgoyal@redhat.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/proc/vmcore.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/fs/proc/vmcore.c
++++ b/fs/proc/vmcore.c
+@@ -397,6 +397,8 @@ static ssize_t __read_vmcore(char *buffe
+                       if (buflen == 0)
+                               return acc;
+               }
++
++              cond_resched();
+       }
+       return acc;
index 5a9e299fb42eef95c020dd17a9615a523d37c1e0..26e195edb54ea04ea87eae4ecf80fbe2026bca62 100644 (file)
@@ -66,3 +66,4 @@ kheaders-ignore-silly-rename-files.patch
 poll_wait-add-mb-to-fix-theoretical-race-between-wai.patch
 nvmet-propagate-npwg-topology.patch
 net-ethernet-xgbe-re-add-aneg-to-supported-features-in-phy-quirks.patch
+fs-proc-fix-softlockup-in-__read_vmcore-part-2.patch