1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-29 08:08:37 +00:00

Don't assert that the domain free lock is held until we're certain that

there is a valid reservation.  This can trip erroneously when memory
falls within a domain but doesn't have the reservation initialized because
it does not meet size or alignment requirements.

Reported by:	pho, mjg
Sponsored by:	Netflix, Dell/EMC Isilon
This commit is contained in:
Jeff Roberson 2018-03-07 22:04:27 +00:00
parent dec08e67e4
commit f4af595964
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=330624

View File

@ -1044,9 +1044,9 @@ vm_reserv_free_page(vm_page_t m)
vm_reserv_t rv;
rv = vm_reserv_from_page(m);
vm_domain_free_assert_locked(VM_DOMAIN(rv->domain));
if (rv->object == NULL)
return (FALSE);
vm_domain_free_assert_locked(VM_DOMAIN(rv->domain));
vm_reserv_depopulate(rv, m - rv->pages);
return (TRUE);
}
@ -1093,9 +1093,9 @@ vm_reserv_is_page_free(vm_page_t m)
vm_reserv_t rv;
rv = vm_reserv_from_page(m);
vm_domain_free_assert_locked(VM_DOMAIN(rv->domain));
if (rv->object == NULL)
return (false);
vm_domain_free_assert_locked(VM_DOMAIN(rv->domain));
return (popmap_is_clear(rv->popmap, m - rv->pages));
}