Module Name:    src
Committed By:   cegger
Date:           Fri Feb  5 11:06:37 UTC 2010

Modified Files:
        src/sys/kern: init_main.c

Log Message:
fix LOCKDEBUG panic 'uninitialized lock'.
seminit() calls exithook_establish(). exithook_establish() uses the exec_lock.
exec_lock is initialzed by exec_init(1).
Call exec_init(1) before seminit().


To generate a diff of this commit:
cvs rdiff -u -r1.417 -r1.418 src/sys/kern/init_main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/init_main.c
diff -u src/sys/kern/init_main.c:1.417 src/sys/kern/init_main.c:1.418
--- src/sys/kern/init_main.c:1.417	Sun Jan 31 03:57:01 2010
+++ src/sys/kern/init_main.c	Fri Feb  5 11:06:36 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_main.c,v 1.417 2010/01/31 03:57:01 pooka Exp $	*/
+/*	$NetBSD: init_main.c,v 1.418 2010/02/05 11:06:36 cegger Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.417 2010/01/31 03:57:01 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.418 2010/02/05 11:06:36 cegger Exp $");
 
 #include "opt_ddb.h"
 #include "opt_ipsec.h"
@@ -514,6 +514,11 @@
 	shminit();
 #endif
 
+	vmem_rehash_start();	/* must be before exec_init */
+
+	/* Initialize exec structures */
+	exec_init(1);		/* seminit calls exithook_establish() */
+
 #ifdef SYSVSEM
 	/* Initialize System V style semaphores. */
 	seminit();
@@ -685,11 +690,6 @@
 	    uvm_aiodone_worker, NULL, PRI_VM, IPL_NONE, WQ_MPSAFE))
 		panic("fork aiodoned");
 
-	vmem_rehash_start();
-
-	/* Initialize exec structures */
-	exec_init(1);
-
 	/*
 	 * Okay, now we can let init(8) exec!  It's off to userland!
 	 */

Reply via email to