Correct an assertion in the code to traverse the list of locks to find an
earlier acquired lock with the same witness as the lock currently being acquired. If we had released several earlier acquired locks after acquiring enough locks to require another lock_list_entry bucket in the lock list, then subsequent lock_list_entry buckets could contain only one lock instance in which case i would be zero. Reported by: Joel M. Baldwin <qumqats@outel.org>
This commit is contained in:
parent
2ac8c61ac4
commit
d2b28e078a
@ -666,7 +666,7 @@ witness_lock(struct lock_object *lock, int flags, const char *file, int line)
|
||||
if (i == 0 && lle->ll_next != NULL) {
|
||||
lle = lle->ll_next;
|
||||
i = lle->ll_count - 1;
|
||||
MPASS(i != 0);
|
||||
MPASS(i >= 0 && i < LOCK_NCHILDREN);
|
||||
}
|
||||
} while (i >= 0);
|
||||
if (i < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user