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-prev] [day] [month] [year] [list]
Message-ID: <tip-57675cb976eff977aefb428e68e4e0236d48a9ff@git.kernel.org>
Date:	Tue, 14 Jun 2016 04:35:34 -0700
From:	tip-bot for Andrey Ryabinin <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	aryabinin@...tuozzo.com, hpa@...or.com,
	torvalds@...ux-foundation.org, tglx@...utronix.de,
	linux-kernel@...r.kernel.org, peterz@...radead.org,
	stable@...r.kernel.org, mingo@...nel.org
Subject: [tip:sched/urgent] kernel/sysrq, watchdog, sched/core: Reset
 watchdog on all CPUs while processing sysrq-w

Commit-ID:  57675cb976eff977aefb428e68e4e0236d48a9ff
Gitweb:     http://git.kernel.org/tip/57675cb976eff977aefb428e68e4e0236d48a9ff
Author:     Andrey Ryabinin <aryabinin@...tuozzo.com>
AuthorDate: Thu, 9 Jun 2016 15:20:05 +0300
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 14 Jun 2016 12:48:38 +0200

kernel/sysrq, watchdog, sched/core: Reset watchdog on all CPUs while processing sysrq-w

Lengthy output of sysrq-w may take a lot of time on slow serial console.

Currently we reset NMI-watchdog on the current CPU to avoid spurious
lockup messages. Sometimes this doesn't work since softlockup watchdog
might trigger on another CPU which is waiting for an IPI to proceed.
We reset softlockup watchdogs on all CPUs, but we do this only after
listing all tasks, and this may be too late on a busy system.

So, reset watchdogs CPUs earlier, in for_each_process_thread() loop.

Signed-off-by: Andrey Ryabinin <aryabinin@...tuozzo.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: <stable@...r.kernel.org>
Link: http://lkml.kernel.org/r/1465474805-14641-1-git-send-email-aryabinin@virtuozzo.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 kernel/sched/core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 13d0896..4135ac8 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5147,14 +5147,16 @@ void show_state_filter(unsigned long state_filter)
 		/*
 		 * reset the NMI-timeout, listing all files on a slow
 		 * console might take a lot of time:
+		 * Also, reset softlockup watchdogs on all CPUs, because
+		 * another CPU might be blocked waiting for us to process
+		 * an IPI.
 		 */
 		touch_nmi_watchdog();
+		touch_all_softlockup_watchdogs();
 		if (!state_filter || (p->state & state_filter))
 			sched_show_task(p);
 	}
 
-	touch_all_softlockup_watchdogs();
-
 #ifdef CONFIG_SCHED_DEBUG
 	if (!state_filter)
 		sysrq_sched_debug_show();

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ