summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2001-04-20 22:38:40 +0000
committeralfred <alfred@FreeBSD.org>2001-04-20 22:38:40 +0000
commit9ae313b4adccf084144f25c8f601bdea464bf2e1 (patch)
treeb94ce483509220981eda1c7783f49af776647e38
parentf1556a21a42fe7d360b61ebd3f367e26a42a3c77 (diff)
downloadFreeBSD-src-9ae313b4adccf084144f25c8f601bdea464bf2e1.zip
FreeBSD-src-9ae313b4adccf084144f25c8f601bdea464bf2e1.tar.gz
Assert that when using an interlock mutex it is not recursed when lockmgr()
is called. Ok'd by: jhb
-rw-r--r--sys/kern/kern_lock.c4
1 files changed, 3 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud