When pmap_pinit0() allocates a page for proc0's page directory,

kernal page table may need to be extended.  But while growing the
kernel page table (pmap_growkernel()), newly allocated kernel page
table pages are entered into every process' page directory. For
proc0, the page directory is not allocated yet, and results in a
page fault.  Eventually, the machine panics with "lockmgr: not
holding exclusive lock".

PR:		5458
Reviewed by:	phk
Submitted by:	Luoqi Chen <luoqi@luoqi.watermarkgroup.com>
This commit is contained in:
Poul-Henning Kamp 1998-04-11 17:24:06 +00:00
parent 044b7805a9
commit a2481bbe8e
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* @(#)init_main.c 8.9 (Berkeley) 1/21/94
* $Id: init_main.c,v 1.87 1998/04/06 15:51:22 peter Exp $
* $Id: init_main.c,v 1.88 1998/04/08 09:01:52 phk Exp $
*/
#include "opt_devfs.h"
@ -380,9 +380,9 @@ proc0_init(dummy)
limit0.p_refcnt = 1;
/* Allocate a prototype map so we have something to fork. */
pmap_pinit0(&vmspace0.vm_pmap);
p->p_vmspace = &vmspace0;
vmspace0.vm_refcnt = 1;
pmap_pinit0(&vmspace0.vm_pmap);
vm_map_init(&vmspace0.vm_map, round_page(VM_MIN_ADDRESS),
trunc_page(VM_MAXUSER_ADDRESS));
vmspace0.vm_map.pmap = &vmspace0.vm_pmap;