Date: Sun, 5 Feb 2017 02:27:04 +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: r313261 - head/sys/kern Message-ID: <201702050227.v152R4Ev010437@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Sun Feb 5 02:27:04 2017 New Revision: 313261 URL: https://svnweb.freebsd.org/changeset/base/313261 Log: Make witness_warn() always print to the console. witness_warn() either breaks into the debugger or panics the system, so its output should go to the console regardless of the witness(4) output channel configuration. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Sun Feb 5 01:40:27 2017 (r313260) +++ head/sys/kern/subr_witness.c Sun Feb 5 02:27:04 2017 (r313261) @@ -1732,15 +1732,14 @@ witness_warn(int flags, struct lock_obje continue; if (n == 0) { va_start(ap, fmt); - witness_voutput(fmt, ap); + vprintf(fmt, ap); va_end(ap); - witness_output( - " with the following %slocks held:\n", + printf(" with the following %slocks held:\n", (flags & WARN_SLEEPOK) != 0 ? "non-sleepable " : ""); } n++; - witness_list_lock(lock1, witness_output); + witness_list_lock(lock1, printf); } /* @@ -1765,11 +1764,11 @@ witness_warn(int flags, struct lock_obje return (0); va_start(ap, fmt); - witness_voutput(fmt, ap); + vprintf(fmt, ap); va_end(ap); - witness_output(" with the following %slocks held:\n", + printf(" with the following %slocks held:\n", (flags & WARN_SLEEPOK) != 0 ? "non-sleepable " : ""); - n += witness_list_locks(&lock_list, witness_output); + n += witness_list_locks(&lock_list, printf); } else sched_unpin(); if (flags & WARN_PANIC && n)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702050227.v152R4Ev010437>