lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1936bd18-775b-43e3-bfd5-2cd343565f06@paulmck-laptop>
Date: Wed, 24 Jul 2024 17:04:58 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: linux-kernel@...r.kernel.org
Cc: axboe@...nel.dk, brauner@...nel.org, oleg@...hat.com,
	akpm@...ux-foundation.org, willy@...radead.org, clm@...com,
	riel@...riel.com, ffledgling@...a.com
Subject: [PATCH RFC exit] Sleep at TASK_IDLE when waiting for application
 core dump

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 triggers "task blocked" splats.  There does not seem to be
any reasonable benefit to getting these splats.

Therefore, change that TASK_UNINTERRUPTIBLE to TASK_IDLE.

Reported-by: Anhad Jai Singh <ffledgling@...a.com>
Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
Cc: Jens Axboe <axboe@...nel.dk>
Cc: Christian Brauner <brauner@...nel.org>
Cc: Oleg Nesterov <oleg@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: "Matthew Wilcox (Oracle)" <willy@...radead.org>
Cc: Chris Mason <clm@...com>
Cc: Rik van Riel <riel@...riel.com>

diff --git a/kernel/exit.c b/kernel/exit.c
index f95a2c1338a8..b0d18f7b6d15 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -429,7 +429,7 @@ static void coredump_task_exit(struct task_struct *tsk)
 			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();

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ