When a page is mapped for write access on a read fault, the PTE should be

configured to trap on a write access unless *all* of the page's dirty bits
are set.
This commit is contained in:
Alan Cox 2009-05-23 18:33:22 +00:00
parent 5662349ed5
commit b4b264f3e9

View File

@ -3116,7 +3116,8 @@ init_pte_prot(vm_offset_t va, vm_page_t m, vm_prot_t prot)
*/
rw = PTE_RWPAGE;
vm_page_dirty(m);
} else if ((m->md.pv_flags & PV_TABLE_MOD) || m->dirty)
} else if ((m->md.pv_flags & PV_TABLE_MOD) ||
m->dirty == VM_PAGE_BITS_ALL)
rw = PTE_RWPAGE;
else
rw = PTE_CWPAGE;