split_large_page(): avoid panic when splitting "non-mapped" large pages
This commit is contained in:
@@ -910,11 +910,17 @@ static int split_large_page(pte_t *ptep, size_t pgsize)
|
|||||||
|
|
||||||
*ptep = (virt_to_phys(pt) & PT_PHYSMASK) | PFL2_PDIR_ATTR;
|
*ptep = (virt_to_phys(pt) & PT_PHYSMASK) | PFL2_PDIR_ATTR;
|
||||||
|
|
||||||
if (phys_base != NOPHYS) {
|
/* Do not do this check for large pages as they don't come from the zeroobj
|
||||||
page = phys_to_page(phys_base);
|
* and are not actually mapped.
|
||||||
if (page && page_unmap(page)) {
|
* TODO: clean up zeroobj as we don't really need it, anonymous mappings
|
||||||
kprintf("split_large_page:page_unmap:%p\n", page);
|
* should be allocated for real */
|
||||||
panic("split_large_page:page_unmap\n");
|
if (pgsize != PTL2_SIZE) {
|
||||||
|
if (phys_base != NOPHYS) {
|
||||||
|
page = phys_to_page(phys_base);
|
||||||
|
if (pgsize != PTL2_SIZE && page && page_unmap(page)) {
|
||||||
|
kprintf("split_large_page:page_unmap:%p\n", page);
|
||||||
|
panic("split_large_page:page_unmap\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user