diff options
author | alc <alc@FreeBSD.org> | 2005-08-07 22:00:47 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2005-08-07 22:00:47 +0000 |
commit | 68bd5d24d16b026fe35280d77337e5a9341c1ade (patch) | |
tree | 6b7df02c621989441d8d4bc3aac9d54a7f9c0c7f /sys | |
parent | 6fecd62c1ea649a0bcfd4f7b510e76afbeb46485 (diff) | |
download | FreeBSD-src-68bd5d24d16b026fe35280d77337e5a9341c1ade.zip FreeBSD-src-68bd5d24d16b026fe35280d77337e5a9341c1ade.tar.gz |
When support for 2MB/4MB pages was added in revision 1.148 an error was
made in pmap_protect(): The pmap's resident count should not be reduced
unless mappings are removed.
The errant change to the pmap's resident count could result in a later
pmap_remove() failing to remove any mappings if the errant change has set
the pmap's resident count to zero.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 1 | ||||
-rw-r--r-- | sys/i386/i386/pmap.c | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 507e09c..116ff3e 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1763,7 +1763,6 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot) */ if ((ptpaddr & PG_PS) != 0) { *pde &= ~(PG_M|PG_RW); - pmap->pm_stats.resident_count -= NBPDR / PAGE_SIZE; anychanged = 1; continue; } diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index bc6a40b..0a3e0ec 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -1788,7 +1788,6 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot) */ if ((ptpaddr & PG_PS) != 0) { pmap->pm_pdir[pdirindex] &= ~(PG_M|PG_RW); - pmap->pm_stats.resident_count -= NBPDR / PAGE_SIZE; anychanged = 1; continue; } |