Extend r335969 to superpages.
It is possible that a fictitious unmanaged userspace mapping of superpage is created on x86, e.g. by pmap_object_init_pt(), with the physical address outside the vm_page_array[] coverage. Noted and reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D16085
This commit is contained in:
parent
096da4de18
commit
945a6b310b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=336010
@ -2308,7 +2308,6 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot)
|
||||
PG_PS_FRAME) | (va & PDRMASK), &pa))
|
||||
goto retry;
|
||||
m = PHYS_TO_VM_PAGE(pa);
|
||||
vm_page_hold(m);
|
||||
}
|
||||
} else {
|
||||
pte = *pmap_pde_to_pte(pdep, va);
|
||||
@ -2318,10 +2317,10 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot)
|
||||
&pa))
|
||||
goto retry;
|
||||
m = PHYS_TO_VM_PAGE(pa);
|
||||
if (m != NULL)
|
||||
vm_page_hold(m);
|
||||
}
|
||||
}
|
||||
if (m != NULL)
|
||||
vm_page_hold(m);
|
||||
}
|
||||
PA_UNLOCK_COND(pa);
|
||||
PMAP_UNLOCK(pmap);
|
||||
|
@ -1673,7 +1673,6 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot)
|
||||
PG_PS_FRAME) | (va & PDRMASK), &pa))
|
||||
goto retry;
|
||||
m = PHYS_TO_VM_PAGE(pa);
|
||||
vm_page_hold(m);
|
||||
}
|
||||
} else {
|
||||
pte = pmap_pte_ufast(pmap, va, pde);
|
||||
@ -1683,10 +1682,10 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot)
|
||||
&pa))
|
||||
goto retry;
|
||||
m = PHYS_TO_VM_PAGE(pa);
|
||||
if (m != NULL)
|
||||
vm_page_hold(m);
|
||||
}
|
||||
}
|
||||
if (m != NULL)
|
||||
vm_page_hold(m);
|
||||
}
|
||||
PA_UNLOCK_COND(pa);
|
||||
PMAP_UNLOCK(pmap);
|
||||
|
Loading…
Reference in New Issue
Block a user