Date: Fri, 28 Feb 2003 10:07:26 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 26083 for review Message-ID: <200302281807.h1SI7QU1057406@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302281807.h1SI7QU1057406>