Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern fix LOCKDEBUG panic 'uninitialized lock'.



details:   https://anonhg.NetBSD.org/src/rev/9e5dbe4b9da7
branches:  trunk
changeset: 751474:9e5dbe4b9da7
user:      cegger <cegger%NetBSD.org@localhost>
date:      Fri Feb 05 11:06:36 2010 +0000

description:
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().

diffstat:

 sys/kern/init_main.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (42 lines):

diff -r d92c6f80e743 -r 9e5dbe4b9da7 sys/kern/init_main.c
--- a/sys/kern/init_main.c      Fri Feb 05 10:10:04 2010 +0000
+++ b/sys/kern/init_main.c      Fri Feb 05 11:06:36 2010 +0000
@@ -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!
         */



Home | Main Index | Thread Index | Old Index