From 0d52e78c527ec7ba3ac62d40d9fa588c964d4c55 Mon Sep 17 00:00:00 2001 From: Venkatesh Srinivas Date: Tue, 27 Mar 2012 07:55:17 -0700 Subject: [PATCH] kernel -- DEBUG_LOCKS: Do not panic if releasing a lockmgr lock w/ spinlocks held. --- sys/kern/kern_lock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index f08f3648b7..5ee689f379 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -190,7 +190,8 @@ debuglockmgr(struct lock *lkp, u_int flags, #ifdef DEBUG_LOCKS if (mycpu->gd_spinlocks_wr && - ((flags & LK_NOWAIT) == 0) + ((flags & LK_NOWAIT) == 0 && + ((flags & LK_RELEASE) == 0) ) { panic("lockmgr %s from %s:%d: called with %d spinlocks held", lkp->lk_wmesg, file, line, mycpu->gd_spinlocks_wr); -- 2.41.0