aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2001-06-28 22:22:20 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2001-06-28 22:22:20 +0000
commitec178c1e4cca8648deb24ac5da34694cc329803a (patch)
tree973088140d4c0e016c7b6f639aa23ecb8b43f714
parented87274d1667da183decdf76f6854a50f40a16ce (diff)
Notes
-rw-r--r--sys/kern/subr_witness.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c
index f253c7df42a3..df2516860619 100644
--- a/sys/kern/subr_witness.c
+++ b/sys/kern/subr_witness.c
@@ -1351,6 +1351,9 @@ witness_assert(struct lock_object *lock, int flags, const char *file, int line)
#ifdef INVARIANT_SUPPORT
struct lock_instance *instance;
+ if (lock->lo_witness == NULL || witness_dead)
+ return;
+
if ((lock->lo_class->lc_flags & LC_SLEEPLOCK) != 0)
instance = find_instance(curproc->p_sleeplocks, lock);
else if ((lock->lo_class->lc_flags & LC_SPINLOCK) != 0)