kernel -- DEBUG_LOCKS: Do not panic if releasing a lockmgr lock w/ spinlocks held.
authorVenkatesh Srinivas <me@endeavour.zapto.org>
Tue, 27 Mar 2012 14:55:17 +0000 (07:55 -0700)
committerVenkatesh Srinivas <me@endeavour.zapto.org>
Tue, 27 Mar 2012 14:55:17 +0000 (07:55 -0700)
sys/kern/kern_lock.c

index f08f364..5ee689f 100644 (file)
@@ -190,7 +190,8 @@ debuglockmgr(struct lock *lkp, u_int flags,
 
 #ifdef DEBUG_LOCKS
        if (mycpu->gd_spinlocks_wr &&
-           ((flags & LK_NOWAIT) == 0) 
+           ((flags & LK_NOWAIT) == 0 &&
+           ((flags & LK_RELEASE) == 0)
        ) {
                panic("lockmgr %s from %s:%d: called with %d spinlocks held",
                      lkp->lk_wmesg, file, line, mycpu->gd_spinlocks_wr);