From owner-svn-src-head@freebsd.org Sat Jan 14 22:16:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63F54CAFF0D; Sat, 14 Jan 2017 22:16:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33A6B1EBD; Sat, 14 Jan 2017 22:16:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0EMG3EX093071; Sat, 14 Jan 2017 22:16:03 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EMG3rN093070; Sat, 14 Jan 2017 22:16:03 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701142216.v0EMG3rN093070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 14 Jan 2017 22:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312199 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 22:16:04 -0000 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;