Don't set PG_WRITEABLE in pmap_enter() unless the page is managed.
This commit is contained in:
parent
0a100e5b0b
commit
2368a37125
@ -1140,7 +1140,8 @@ moea_enter_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
|
||||
|
||||
if (prot & VM_PROT_WRITE) {
|
||||
pte_lo |= PTE_BW;
|
||||
if (pmap_bootstrapped)
|
||||
if (pmap_bootstrapped &&
|
||||
(m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0)
|
||||
vm_page_flag_set(m, PG_WRITEABLE);
|
||||
} else
|
||||
pte_lo |= PTE_BR;
|
||||
|
@ -1249,7 +1249,8 @@ moea64_enter_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
|
||||
|
||||
if (prot & VM_PROT_WRITE) {
|
||||
pte_lo |= LPTE_BW;
|
||||
if (pmap_bootstrapped)
|
||||
if (pmap_bootstrapped &&
|
||||
(m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0)
|
||||
vm_page_flag_set(m, PG_WRITEABLE);
|
||||
} else
|
||||
pte_lo |= LPTE_BR;
|
||||
|
Loading…
Reference in New Issue
Block a user