aboutsummaryrefslogtreecommitdiff
path: root/sys/vm/vm_reserv.c
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2018-03-07 22:04:27 +0000
committerJeff Roberson <jeff@FreeBSD.org>2018-03-07 22:04:27 +0000
commitf4af5959643421dafea5cbfd4b7811f0b3720290 (patch)
tree8b1c60d6ad360b72f0c78b90269b2b2a0dd8760b /sys/vm/vm_reserv.c
parentdec08e67e4b078beadd7e5bb3b68cad2fc0074c5 (diff)
downloadsrc-f4af5959643421dafea5cbfd4b7811f0b3720290.tar.gz
src-f4af5959643421dafea5cbfd4b7811f0b3720290.zip
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
Notes
Notes: svn path=/head/; revision=330624
Diffstat (limited to 'sys/vm/vm_reserv.c')
-rw-r--r--sys/vm/vm_reserv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/vm/vm_reserv.c b/sys/vm/vm_reserv.c
index 7e206b3e2526..dc4ac9350525 100644
--- a/sys/vm/vm_reserv.c
+++ b/sys/vm/vm_reserv.c
@@ -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));
}