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)
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to