MFC: Fix a bug in pmap_protect() in the PAE case where it could look up the

wrong vm_page_t associated with a pte.

Approved by:	re (kensmith)
This commit is contained in:
jhb 2005-08-04 16:41:25 +00:00
parent 4cb10a2e72
commit 28b017aabc

View File

@ -1810,14 +1810,14 @@ retry:
if (pbits & PG_MANAGED) {
m = NULL;
if (pbits & PG_A) {
m = PHYS_TO_VM_PAGE(pbits);
m = PHYS_TO_VM_PAGE(*pte);
vm_page_flag_set(m, PG_REFERENCED);
pbits &= ~PG_A;
}
if ((pbits & PG_M) != 0 &&
pmap_track_modified(sva)) {
if (m == NULL)
m = PHYS_TO_VM_PAGE(pbits);
m = PHYS_TO_VM_PAGE(*pte);
vm_page_dirty(m);
}
}