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().
This commit is contained in:
parent
461cb40b76
commit
8e585686fb
@ -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 @@ main(void)
|
||||
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 @@ main(void)
|
||||
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!
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user