]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 May 2026 15:31:59 +0000 (17:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 May 2026 15:31:59 +0000 (17:31 +0200)
added patches:
exit-sleep-at-task_idle-when-waiting-for-application-core-dump.patch

queue-6.1/exit-sleep-at-task_idle-when-waiting-for-application-core-dump.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/exit-sleep-at-task_idle-when-waiting-for-application-core-dump.patch b/queue-6.1/exit-sleep-at-task_idle-when-waiting-for-application-core-dump.patch
new file mode 100644 (file)
index 0000000..8c1c80e
--- /dev/null
@@ -0,0 +1,53 @@
+From b8e753128ed074fcb48e9ceded940752f6b1c19f Mon Sep 17 00:00:00 2001
+From: "Paul E. McKenney" <paulmck@kernel.org>
+Date: Wed, 24 Jul 2024 16:51:52 -0700
+Subject: exit: Sleep at TASK_IDLE when waiting for application core dump
+
+From: Paul E. McKenney <paulmck@kernel.org>
+
+commit b8e753128ed074fcb48e9ceded940752f6b1c19f upstream.
+
+Currently, the coredump_task_exit() function sets the task state
+to TASK_UNINTERRUPTIBLE|TASK_FREEZABLE, which usually works well.
+But a combination of large memory and slow (and/or highly contended)
+mass storage can cause application core dumps to take more than
+two minutes, which can cause check_hung_task(), which is invoked by
+check_hung_uninterruptible_tasks(), to produce task-blocked splats.
+There does not seem to be any reasonable benefit to getting these splats.
+
+Furthermore, as Oleg Nesterov points out, TASK_UNINTERRUPTIBLE could
+be misleading because the task sleeping in coredump_task_exit() really
+is killable, albeit indirectly.  See the check of signal->core_state
+in prepare_signal() and the check of fatal_signal_pending()
+in dump_interrupted(), which bypass the normal unkillability of
+TASK_UNINTERRUPTIBLE, resulting in coredump_finish() invoking
+wake_up_process() on any threads sleeping in coredump_task_exit().
+
+Therefore, change that TASK_UNINTERRUPTIBLE to TASK_IDLE.
+
+Reported-by: Anhad Jai Singh <ffledgling@meta.com>
+Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
+Acked-by: Oleg Nesterov <oleg@redhat.com>
+Cc: Jens Axboe <axboe@kernel.dk>
+Cc: Christian Brauner <brauner@kernel.org>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
+Cc: Chris Mason <clm@fb.com>
+Cc: Rik van Riel <riel@surriel.com>
+Cc: Paul Menzel <pmenzel@molgen.mpg.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/exit.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/exit.c
++++ b/kernel/exit.c
+@@ -426,7 +426,7 @@ static void coredump_task_exit(struct ta
+                       complete(&core_state->startup);
+               for (;;) {
+-                      set_current_state(TASK_UNINTERRUPTIBLE|TASK_FREEZABLE);
++                      set_current_state(TASK_IDLE|TASK_FREEZABLE);
+                       if (!self.task) /* see coredump_finish() */
+                               break;
+                       schedule();
index 35f06038f8444f66605e444f1cad21fcc99b7e5c..210925011cd18406a0b50d67c952a25bb8874779 100644 (file)
@@ -386,3 +386,4 @@ loongarch-use-per-root-bridge-pcih-flag-to-skip-mem-resource-fixup.patch
 f2fs-compress-change-the-first-parameter-of-page_arr.patch
 f2fs-compress-fix-uaf-of-f2fs_inode_info-in-f2fs_fre.patch
 x86-cpu-amd-prevent-improper-isolation-of-shared-resources-in-zen2-s-op-cache.patch
+exit-sleep-at-task_idle-when-waiting-for-application-core-dump.patch