From 3735beb96fdbbbbb209fd20339f0662fee69897a Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sun, 23 Jan 2011 00:19:22 -0800 Subject: [PATCH] kernel - stop cpus on panic whether the debugger is entered or not * Stop cpus on panic regardless of the state of debug.debugger_on_panic. * Cpus were previously only stopped when entering the debugger, causing unattended panics not entering the debugger to often cause secondary panics on other cpus and lockup entirely. --- sys/kern/kern_shutdown.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index 320ff74d8b..3e367e66f8 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -778,12 +778,20 @@ panic(const char *fmt, ...) wdog_disable(); #endif + /* + * Enter the debugger or fall through & dump. Entering the + * debugger will stop cpus. If not entering the debugger stop + * cpus here. + */ #if defined(DDB) if (newpanic && trace_on_panic) print_backtrace(-1); if (debugger_on_panic) Debugger("panic"); + else #endif + if (newpanic) + stop_cpus(mycpu->gd_other_cpus); boot(bootopt); } -- 2.41.0