summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1998-04-11 17:24:06 +0000
committerphk <phk@FreeBSD.org>1998-04-11 17:24:06 +0000
commit87312aadccbc33e70fd10dadb1258ffd51aac8d8 (patch)
tree1c66912419a1a741d3c345a70e6713e5c44e9430 /sys/kern/init_main.c
parent05ae376d90d1b108d25b0317e7c14c2367242bfc (diff)
downloadFreeBSD-src-87312aadccbc33e70fd10dadb1258ffd51aac8d8.zip
FreeBSD-src-87312aadccbc33e70fd10dadb1258ffd51aac8d8.tar.gz
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>
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 572eff1..022cfa3 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -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;
OpenPOWER on IntegriCloud