diff options
| author | Attilio Rao <attilio@FreeBSD.org> | 2008-04-12 13:56:17 +0000 |
|---|---|---|
| committer | Attilio Rao <attilio@FreeBSD.org> | 2008-04-12 13:56:17 +0000 |
| commit | 872b7289fd535cc0b27e16e9c10a032f36a582c9 (patch) | |
| tree | c6528cf70dc9ed0ddcf83c63e4ea9967b90301bf | |
| parent | 1859cffaef4b874dee2d1d317dfad245054e364a (diff) | |
Notes
| -rw-r--r-- | sys/kern/kern_lock.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 7722c15c1c5f..099a5be5ca65 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -319,6 +319,8 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk, itimo = (timo == LK_TIMO_DEFAULT) ? lk->lk_timo : timo; MPASS((flags & ~LK_TOTAL_MASK) == 0); + KASSERT((op & (op - 1)) == 0, + ("%s: Invalid requested operation @ %s:%d", __func__, file, line)); KASSERT((flags & (LK_NOWAIT | LK_SLEEPFAIL)) == 0 || (op != LK_DOWNGRADE && op != LK_RELEASE), ("%s: Invalid flags in regard of the operation desired @ %s:%d", @@ -797,10 +799,6 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk, panic("%s: unknown lockmgr request 0x%x\n", __func__, op); } - /* - * We could have exited from the switch without reacquiring the - * interlock, so we need to check for the interlock ownership. - */ if (flags & LK_INTERLOCK) class->lc_unlock(ilk); |
