Date: Tue, 7 Jul 2015 19:29:19 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285252 - head/sys/kern Message-ID: <201507071929.t67JTJIp066509@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Tue Jul 7 19:29:18 2015 New Revision: 285252 URL: https://svnweb.freebsd.org/changeset/base/285252 Log: Fix an incorrect assertion in witness. The number of available lock list entries for a thread is LOCK_CHILDCOUNT, and each entry can record up to LOCK_NCHILDREN locks. When iterating over the locks held by a thread, a bound on the loop index is therefore given by LOCK_CHILDCOUNT * LOCK_NCHILDREN; WITNESS_COUNT is an unrelated constant. Reviewed by: jhb MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D2974 Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Tue Jul 7 19:23:59 2015 (r285251) +++ head/sys/kern/subr_witness.c Tue Jul 7 19:29:18 2015 (r285252) @@ -1221,7 +1221,7 @@ witness_checkorder(struct lock_object *l for (j = 0, lle = lock_list; lle != NULL; lle = lle->ll_next) { for (i = lle->ll_count - 1; i >= 0; i--, j++) { - MPASS(j < witness_count); + MPASS(j < LOCK_CHILDCOUNT * LOCK_NCHILDREN); lock1 = &lle->ll_children[i]; /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507071929.t67JTJIp066509>