diff options
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r-- | sys/kern/kern_lock.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index c92dabf..92e8b05 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -278,8 +278,10 @@ debuglockmgr(lkp, flags, interlkp, p, name, file, line) /* fall into downgrade */ case LK_DOWNGRADE: - if (lkp->lk_lockholder != pid || lkp->lk_exclusivecount == 0) - panic("lockmgr: not holding exclusive lock"); + KASSERT(lkp->lk_lockholder == pid && lkp->lk_exclusivecount != 0, + ("lockmgr: not holding exclusive lock " + "(owner pid (%d) != pid (%d), exlcnt (%d) != 0", + lkp->lk_lockholder, pid, lkp->lk_exclusivecount)); sharelock(lkp, lkp->lk_exclusivecount); lkp->lk_exclusivecount = 0; lkp->lk_flags &= ~LK_HAVE_EXCL; |