* + watchdog-force-console-verbose-when-reporting-lockups.patch added to mm-nonmm-unstable branch
@ 2026-10-21 4:09 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-10-21 4:09 UTC (permalink / raw)
To: mm-commits, tfiga, senozhatsky, pmladek, dianders, brads, tzungbi,
akpm
The patch titled
Subject: watchdog: force console verbose when reporting lockups
has been added to the -mm mm-nonmm-unstable branch. Its filename is
watchdog-force-console-verbose-when-reporting-lockups.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/watchdog-force-console-verbose-when-reporting-lockups.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Tzung-Bi Shih <tzungbi@kernel.org>
Subject: watchdog: force console verbose when reporting lockups
Date: Wed, 07 Oct 2026 05:17:26 +0000
When a hard or soft lockup is detected, the watchdog prints a header at
KERN_EMERG (<0>), followed by diagnostic details (modules, registers, and
backtraces) at KERN_WARNING/KERN_DEFAULT (<4>) and KERN_INFO (<6>). If
console_loglevel is quiet (<= 4), the console skips those <4>/<6>
diagnostic messages before vpanic() has a chance to call
console_verbose(). With the buddy detector, this leaves only the detector
CPU's panic stack on the console and nothing about the locked CPU:
<0>[ 1535.991833][ C6] watchdog: Watchdog detected hard LOCKUP on cpu 7
<0>[ 1535.995960][ C6] Kernel panic - not syncing: Hard LOCKUP
<4>[ 1535.995970][ C6] CPU: 6 UID: 0 PID: 0 Comm: swapper/6 ...
<4>[ 1535.995997][ C6] Call trace:
...
<4>[ 1535.996063][ C6] watchdog_hardlockup_check+0x1e0/0x288
<4>[ 1535.996075][ C6] watchdog_buddy_check_hardlockup+0xb4/0xc0
Similar to commit 168e06f7937d ("kernel/hung_task.c: force console verbose
before panic"), call console_verbose() before printing the lockup report
so the diagnostic output is not suppressed.
Link: https://lore.kernel.org/20261007051726.4154849-1-tzungbi@kernel.org
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Bradley Morgan <brads@mainlining.org>
Tested-by: Bradley Morgan <brads@mainlining.org> # Power10 / ARM64
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Tomasz Figa <tfiga@chromium.org>
---
kernel/watchdog.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/kernel/watchdog.c~watchdog-force-console-verbose-when-reporting-lockups
+++ a/kernel/watchdog.c
@@ -255,6 +255,9 @@ void watchdog_hardlockup_check(unsigned
return;
}
+ if (hardlockup_panic)
+ console_verbose();
+
/*
* NOTE: we call printk_cpu_sync_get_irqsave() after printing
* the lockup message. While it would be nice to serialize
@@ -880,6 +883,10 @@ static enum hrtimer_restart watchdog_tim
/* Start period for the next softlockup warning. */
update_report_ts();
+ thresh_count = duration / get_softlockup_thresh();
+ if (softlockup_panic && thresh_count >= softlockup_panic)
+ console_verbose();
+
printk_cpu_sync_get_irqsave(flags);
pr_emerg("BUG: soft lockup - CPU#%d stuck for %us! [%s:%d]\n",
smp_processor_id(), duration,
@@ -901,7 +908,6 @@ static enum hrtimer_restart watchdog_tim
add_taint(TAINT_SOFTLOCKUP, LOCKDEP_STILL_OK);
sys_info(softlockup_si_mask & ~SYS_INFO_ALL_BT);
- thresh_count = duration / get_softlockup_thresh();
if (softlockup_panic && thresh_count >= softlockup_panic)
panic("softlockup: hung tasks");
_
Patches currently in -mm which might be from tzungbi@kernel.org are
watchdog-force-console-verbose-when-reporting-lockups.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-21 4:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-21 4:09 + watchdog-force-console-verbose-when-reporting-lockups.patch added to mm-nonmm-unstable branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.