diff options
| author | Alfred Perlstein <alfred@FreeBSD.org> | 2001-04-13 10:15:53 +0000 |
|---|---|---|
| committer | Alfred Perlstein <alfred@FreeBSD.org> | 2001-04-13 10:15:53 +0000 |
| commit | 1375ed7eb79c88674e7697083156dc830775cb34 (patch) | |
| tree | 861d2284ded153bb2098f5cb0d198dec1a6296fc /sys | |
| parent | c13d191de3af096b8f05b0972d3f2fe5050357bb (diff) | |
Notes
Diffstat (limited to 'sys')
| -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 c92dabf0bbb6..92e8b052bacf 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; |
