From 9ae313b4adccf084144f25c8f601bdea464bf2e1 Mon Sep 17 00:00:00 2001 From: alfred Date: Fri, 20 Apr 2001 22:38:40 +0000 Subject: Assert that when using an interlock mutex it is not recursed when lockmgr() is called. Ok'd by: jhb --- sys/kern/kern_lock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/kern') diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 92e8b05..d1d5916 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -237,8 +237,10 @@ debuglockmgr(lkp, flags, interlkp, p, name, file, line) pid = p->p_pid; mtx_lock(lkp->lk_interlock); - if (flags & LK_INTERLOCK) + if (flags & LK_INTERLOCK) { mtx_unlock(interlkp); + mtx_assert(interlkp, MA_NOTOWNED); + } extflags = (flags | lkp->lk_flags) & LK_EXTFLG_MASK; -- cgit v1.1