1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

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.
This commit is contained in:
Alan Cox 2005-08-07 22:00:47 +00:00
parent 76d00450e6
commit 5f2c46d5ed
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148835
2 changed files with 0 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}