diff options
| author | 2014-03-31 19:37:15 +0000 | |
|---|---|---|
| committer | 2014-03-31 19:37:15 +0000 | |
| commit | b34365e8c4d6ec2ac03d87f64bd2ab29e604359b (patch) | |
| tree | d9ad965eb74acd89788e9e23abcb9af3cc9126ce /sys/kern/init_main.c | |
| parent | Including <uvm/uvm_extern.h> is enough, no need for <uvm/uvm.h> or more. (diff) | |
| download | wireguard-openbsd-b34365e8c4d6ec2ac03d87f64bd2ab29e604359b.tar.xz wireguard-openbsd-b34365e8c4d6ec2ac03d87f64bd2ab29e604359b.zip | |
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(); |
