diff options
author | 2014-02-03 18:42:05 +0000 | |
---|---|---|
committer | 2014-02-03 18:42:05 +0000 | |
commit | 0011096c563af659736ec0d2b31daef1d03b66e1 (patch) | |
tree | 04fe2b80834ecbe42534bf9ad5acbb9be697f99a | |
parent | don't remove this test, indicate why it can trigger (diff) | |
download | wireguard-openbsd-0011096c563af659736ec0d2b31daef1d03b66e1.tar.xz wireguard-openbsd-0011096c563af659736ec0d2b31daef1d03b66e1.zip |
Make sure sched_init_cpu() on the secondary processors is invoked with the
kernel lock held.
-rw-r--r-- | sys/arch/alpha/alpha/cpu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/alpha/alpha/cpu.c b/sys/arch/alpha/alpha/cpu.c index e94ecf16994..da4742e1892 100644 --- a/sys/arch/alpha/alpha/cpu.c +++ b/sys/arch/alpha/alpha/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.33 2014/02/01 21:17:32 miod Exp $ */ +/* $OpenBSD: cpu.c,v 1.34 2014/02/03 18:42:05 miod Exp $ */ /* $NetBSD: cpu.c,v 1.44 2000/05/23 05:12:53 thorpej Exp $ */ /*- @@ -602,10 +602,12 @@ cpu_hatch(struct cpu_info *ci) ALPHA_TBIA(); alpha_pal_imb(); + KERNEL_LOCK(); sched_init_cpu(ci); nanouptime(&ci->ci_schedstate.spc_runtime); ci->ci_curproc = ci->ci_fpcurproc = NULL; ci->ci_randseed = (arc4random() & 0x7fffffff) + 1; + KERNEL_UNLOCK(); (void) alpha_pal_swpipl(ALPHA_PSL_IPL_0); SCHED_LOCK(s); |