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
This commit is contained in:
parent
c6668379e1
commit
cc6e499b77
@ -1221,7 +1221,7 @@ witness_checkorder(struct lock_object *lock, int flags, const char *file,
|
||||
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];
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user