Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jan 2017 22:16:03 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r312199 - head/sys/kern
Message-ID:  <201701142216.v0EMG3rN093070@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Sat Jan 14 22:16:03 2017
New Revision: 312199
URL: https://svnweb.freebsd.org/changeset/base/312199

Log:
  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

Modified:
  head/sys/kern/kern_shutdown.c

Modified: head/sys/kern/kern_shutdown.c
==============================================================================
--- head/sys/kern/kern_shutdown.c	Sat Jan 14 22:16:01 2017	(r312198)
+++ head/sys/kern/kern_shutdown.c	Sat Jan 14 22:16:03 2017	(r312199)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701142216.v0EMG3rN093070>