diff options
-rw-r--r-- | arch/x86/machine/ssp.c | 4 | ||||
-rw-r--r-- | kern/thread.c | 5 | ||||
-rw-r--r-- | kern/work.c | 3 |
3 files changed, 9 insertions, 3 deletions
diff --git a/arch/x86/machine/ssp.c b/arch/x86/machine/ssp.c index 77d5a2b5..747f3b31 100644 --- a/arch/x86/machine/ssp.c +++ b/arch/x86/machine/ssp.c @@ -21,10 +21,10 @@ void ssp_panic(void); -void +__used void ssp_panic(void) { panic("ssp: stack corruption detected"); } -void __stack_chk_fail(void) __attribute__((alias("ssp_panic"))); +__used void __stack_chk_fail(void) __attribute__((alias("ssp_panic"))); diff --git a/kern/thread.c b/kern/thread.c index 21736cd0..09e15aa0 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -2402,6 +2402,11 @@ thread_exit(void) work_schedule(&zombie.work, 0); } + /* + * Disable preemption before dropping the reference, as this may + * trigger the active state poll of the join operation. Doing so + * keeps the duration of that active wait minimum. + */ thread_preempt_disable(); thread_unref(thread); diff --git a/kern/work.c b/kern/work.c index 365ca30d..a841d38d 100644 --- a/kern/work.c +++ b/kern/work.c @@ -497,12 +497,13 @@ work_setup(void) INIT_OP_DEFINE(work_setup, INIT_OP_DEP(cpu_mp_probe, true), + INIT_OP_DEP(cpumap_setup, true), INIT_OP_DEP(kmem_setup, true), INIT_OP_DEP(log_setup, true), INIT_OP_DEP(panic_setup, true), INIT_OP_DEP(spinlock_setup, true), INIT_OP_DEP(syscnt_setup, true), - INIT_OP_DEP(thread_bootstrap, true)); + INIT_OP_DEP(thread_setup, true)); void work_schedule(struct work *work, int flags) |