aboutsummaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2017-01-14 22:16:03 +0000
committerMark Johnston <markj@FreeBSD.org>2017-01-14 22:16:03 +0000
commit42d33c1f4d851906b445cf18e4e40d7899781e5b (patch)
tree93120dc35b55ff1d0847a3b31bceba4425da44ab /sys/kern
parentc2718b428e0a394b48fa10d252044621b3fd3ec2 (diff)
downloadsrc-42d33c1f4d851906b445cf18e4e40d7899781e5b.tar.gz
src-42d33c1f4d851906b445cf18e4e40d7899781e5b.zip
Stop the scheduler upon panic even in non-SMP kernels.
This is needed for kernel dumps to work, as the panicking thread will call into code that makes use of kernel locks. Reported and tested by: Eugene Grosbein MFC after: 1 week
Notes
Notes: svn path=/head/; revision=312199
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_shutdown.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index f981c8093623..370a5447be4d 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -733,13 +733,13 @@ vpanic(const char *fmt, va_list ap)
CPU_CLR(PCPU_GET(cpuid), &other_cpus);
stop_cpus_hard(other_cpus);
}
+#endif
/*
* Ensure that the scheduler is stopped while panicking, even if panic
* has been entered from kdb.
*/
td->td_stopsched = 1;
-#endif
bootopt = RB_AUTOBOOT;
newpanic = 0;