diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-03-31 19:37:16 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-03-31 19:37:16 +0000 |
commit | c326d34d6700e83783a2cc071c08b1379dbfafd8 (patch) | |
tree | 857d00444fa08159b9fa773123ad512608cc2ac5 /sys/kern/init_main.c | |
parent | 80ac47ce41f72462f7977efeff7a15c724da2b36 (diff) |
Grab the kernel lock before autoconf. This way device drivers can drop it in
any context if they feel like it.
ok deraadt@, guenther@
(who both suggested we could probably grab it even earlier)
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r-- | sys/kern/init_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index aef28cb4634..420e782188e 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.209 2014/03/30 21:54:48 guenther Exp $ */ +/* $OpenBSD: init_main.c,v 1.210 2014/03/31 19:37:15 kettenis Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -343,6 +343,9 @@ main(void *framep) /* Initialize the interface/address trees */ ifinit(); + /* Lock the kernel on behalf of proc0. */ + KERNEL_LOCK(); + #if NMPATH > 0 /* Attach mpath before hardware */ config_rootfound("mpath", NULL); @@ -363,9 +366,6 @@ main(void *framep) /* Start real time and statistics clocks. */ initclocks(); - /* Lock the kernel on behalf of proc0. */ - KERNEL_LOCK(); - #ifdef SYSVSHM /* Initialize System V style shared memory. */ shminit(); |