Ensure that m and skip_m belong to the same object.
Pages allocated from a given reservation may belong to different objects. It is therefore possible for vm_page_ps_test() to be called with the base page's object unlocked. Check for this case before asserting that the object lock is held. Reported by: jhb Reviewed by: kib MFC after: 1 week
This commit is contained in:
parent
8ce99bb405
commit
9de8fcfddf
@ -4140,6 +4140,8 @@ vm_page_ps_test(vm_page_t m, int flags, vm_page_t skip_m)
|
||||
int i, npages;
|
||||
|
||||
object = m->object;
|
||||
if (skip_m != NULL && skip_m->object != object)
|
||||
return (false);
|
||||
VM_OBJECT_ASSERT_LOCKED(object);
|
||||
npages = atop(pagesizes[m->psind]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user