diff options
author | 2002-07-12 14:03:12 +0000 | |
---|---|---|
committer | 2002-07-12 14:03:12 +0000 | |
commit | a7bc56239d11f3400c9de302d38152f1d521ca98 (patch) | |
tree | ec6f24fa71a81be66966a4fd35ffe3150f70e779 | |
parent | Change the locking on the mountpoint slightly. Instead of using mnt_lock (diff) | |
download | wireguard-openbsd-a7bc56239d11f3400c9de302d38152f1d521ca98.tar.xz wireguard-openbsd-a7bc56239d11f3400c9de302d38152f1d521ca98.zip |
Detect the case where we LK_RELEASE a lock when noone is holding it.
-rw-r--r-- | sys/kern/kern_lock.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index b35d8f25c23..b9b12083941 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_lock.c,v 1.13 2002/03/17 18:26:51 art Exp $ */ +/* $OpenBSD: kern_lock.c,v 1.14 2002/07/12 14:03:12 art Exp $ */ /* * Copyright (c) 1995 @@ -384,7 +384,8 @@ lockmgr(lkp, flags, interlkp, p) } else if (lkp->lk_sharecount != 0) { lkp->lk_sharecount--; COUNT(p, -1); - } + } else + panic("lockmgr: LK_RELEASE of unlocked lock"); if (lkp->lk_waitcount) wakeup((void *)lkp); break; |