diff options
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_lock.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 490244f..55acab6 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -268,8 +268,10 @@ debuglockmgr(lkp, flags, interlkp, td, name, file, line) * after the upgrade). If we return an error, the file * will always be unlocked. */ - if ((lkp->lk_lockholder == thr) || (lkp->lk_sharecount <= 0)) + if (lkp->lk_lockholder == thr) panic("lockmgr: upgrade exclusive lock"); + if (lkp->lk_sharecount <= 0) + panic("lockmgr: upgrade without shared"); shareunlock(td, lkp, 1); /* * If we are just polling, check to see if we will block. |