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
This commit is contained in:
Mark Johnston 2017-01-14 22:16:03 +00:00
parent c2718b428e
commit 42d33c1f4d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=312199

View File

@ -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;