Fix segment table reference bug, from Micheal Hitch.
This commit is contained in:
parent
d3f03a8c0c
commit
a6359b2633
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pmap.c,v 1.20 1995/05/29 19:36:22 hpeyerl Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.21 1995/10/05 06:47:25 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -2509,6 +2509,11 @@ pmap_enter_ptpage(pmap, va)
|
|||
* letting the VM system allocate a zero-filled page.
|
||||
*/
|
||||
else {
|
||||
/*
|
||||
* Count the segment table reference now so that we won't
|
||||
* lose the segment table when low on memory.
|
||||
*/
|
||||
pmap->pm_sref++;
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE))
|
||||
printf("enter: about to fault UPT pg at %x\n", va);
|
||||
|
@ -2593,7 +2598,6 @@ pmap_enter_ptpage(pmap, va)
|
|||
#endif
|
||||
*ste = (ptpa & SG_FRAME) | SG_RW | SG_V;
|
||||
if (pmap != pmap_kernel()) {
|
||||
pmap->pm_sref++;
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE|PDB_SEGTAB))
|
||||
printf("enter: stab %x refcnt %d\n",
|
||||
|
|
Loading…
Reference in New Issue