diff options
author | alc <alc@FreeBSD.org> | 2002-11-17 21:48:42 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-11-17 21:48:42 +0000 |
commit | 9f35c304e044fedb622d6e3459c90cc2eb62c744 (patch) | |
tree | 162f0836ba0be79064fce040d2caaaf7e969b109 /sys/ia64 | |
parent | 066c78a19bcbca009a448401c15e691423281c89 (diff) | |
download | FreeBSD-src-9f35c304e044fedb622d6e3459c90cc2eb62c744.zip FreeBSD-src-9f35c304e044fedb622d6e3459c90cc2eb62c744.tar.gz |
MFi386 r1.369
- Clear the PG_WRITEABLE flag in pmap_page_protect() if write access is
being removed. Return immediately if write access is being removed and
PG_WRITEABLE is already clear.
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/ia64/pmap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index cc271c6..3dea505 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -2213,6 +2213,8 @@ pmap_page_protect(vm_page_t m, vm_prot_t prot) if ((prot & VM_PROT_WRITE) != 0) return; if (prot & (VM_PROT_READ | VM_PROT_EXECUTE)) { + if ((m->flags & PG_WRITEABLE) == 0) + return; TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { int newprot = pte_prot(pv->pv_pmap, prot); pmap_t oldpmap = pmap_install(pv->pv_pmap); @@ -2223,6 +2225,7 @@ pmap_page_protect(vm_page_t m, vm_prot_t prot) pmap_invalidate_page(pv->pv_pmap, pv->pv_va); pmap_install(oldpmap); } + vm_page_flag_clear(m, PG_WRITEABLE); } else { pmap_remove_all(m); } |