diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2019-03-26 04:24:23 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2019-03-26 04:24:23 +0000 |
commit | ec112173c23537b9d97fb4380f863ed6770781c7 (patch) | |
tree | ae3f4c4d83e465b15cfb664d70359481476228bf | |
parent | 7d6fb3ad7223c3001041c88a34cec8b1b53c9b08 (diff) |
Make sure that each ci has its spc_deferred queue initialized.
Otherwise, the system can crash in smr_call_impl() if SMT is
enabled later.
Crash reported by jcs@
-rw-r--r-- | sys/kern/kern_sched.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c index 73ec5bdf683..3eec06330ec 100644 --- a/sys/kern/kern_sched.c +++ b/sys/kern/kern_sched.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sched.c,v 1.55 2019/02/26 14:24:21 visa Exp $ */ +/* $OpenBSD: kern_sched.c,v 1.56 2019/03/26 04:24:22 visa Exp $ */ /* * Copyright (c) 2007, 2008 Artur Grabowski <art@openbsd.org> * @@ -94,6 +94,7 @@ sched_init_cpu(struct cpu_info *ci) kthread_create_deferred(sched_kthreads_create, ci); LIST_INIT(&spc->spc_deadproc); + SIMPLEQ_INIT(&spc->spc_deferred); /* * Slight hack here until the cpuset code handles cpu_info @@ -106,8 +107,6 @@ sched_init_cpu(struct cpu_info *ci) return; #endif cpuset_add(&sched_all_cpus, ci); - - SIMPLEQ_INIT(&spc->spc_deferred); } void |