summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2004-03-23 00:32:27 +0000
committeralfred <alfred@FreeBSD.org>2004-03-23 00:32:27 +0000
commitfbfae479f4ffc058f88cd1baf73dec483a0a1af2 (patch)
tree69c94483ff9728560ce547294cf5fd07a76868db /sys
parent0cae7408ddc80357dafc03d961848402f7ff8775 (diff)
downloadFreeBSD-src-fbfae479f4ffc058f88cd1baf73dec483a0a1af2.zip
FreeBSD-src-fbfae479f4ffc058f88cd1baf73dec483a0a1af2.tar.gz
Emit a traceback when witness_trace is set and witness_warn() is
called and triggers (typically caused by sleeping with a non-sleepable lock). Reviewed by: jhb
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/subr_witness.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c
index 95d7a83..3b05fff 100644
--- a/sys/kern/subr_witness.c
+++ b/sys/kern/subr_witness.c
@@ -1150,6 +1150,8 @@ witness_warn(int flags, struct lock_object *lock, const char *fmt, ...)
#ifdef DDB
else if (witness_ddb && n)
Debugger(__func__);
+ else if (witness_trace && n)
+ backtrace();
#endif
return (n);
}
OpenPOWER on IntegriCloud