From owner-p4-projects Fri Feb 28 10: 7:29 2003 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E737837B405; Fri, 28 Feb 2003 10:07:27 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7FA5037B401 for ; Fri, 28 Feb 2003 10:07:27 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D09D43FCB for ; Fri, 28 Feb 2003 10:07:27 -0800 (PST) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h1SI7R0U057409 for ; Fri, 28 Feb 2003 10:07:27 -0800 (PST) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h1SI7QU1057406 for perforce@freebsd.org; Fri, 28 Feb 2003 10:07:26 -0800 (PST) Date: Fri, 28 Feb 2003 10:07:26 -0800 (PST) Message-Id: <200302281807.h1SI7QU1057406@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 26083 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=26083 Change 26083 by jhb@jhb_laptop on 2003/02/28 10:07:12 Fixup a hack to not stick bogus lock orders in the hierarchy. Affected files ... .. //depot/projects/smpng/sys/kern/subr_witness.c#72 edit Differences ... ==== //depot/projects/smpng/sys/kern/subr_witness.c#72 (text+ko) ==== @@ -781,11 +781,12 @@ } lock1 = &(*lock_list)->ll_children[(*lock_list)->ll_count - 1]; /* - * Don't build a new relationship if we are locking Giant just - * after waking up and the previous lock in the list was acquired - * prior to blocking. + * Don't build a new relationship between a sleepable lock and + * Giant if it is the wrong direction. The real lock order is that + * sleepable locks come before Giant. */ - if (lock == &Giant.mtx_object && (lock1->li_flags & LI_SLEPT) != 0) + if (lock1->li_lock == &Giant.mtx_object && + (lock->lo_flags & LO_SLEEPABLE) != 0) mtx_unlock_spin(&w_mtx); else { CTR3(KTR_WITNESS, "%s: adding %s as a child of %s", __func__, To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message