diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 8e3a5da24d5946e9fa50e5bb291a998a8d867818..3f15edf25a0d69baaf6c0479fa6ce21ec9da590e 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -1014,16 +1015,9 @@ static void cpu_idle_thread_init(unsigned int cpu, struct task_struct *idle) { struct thread_info *ti = task_thread_info(idle); -#ifdef CONFIG_STACKPROTECTOR - idle->stack_canary = get_random_canary(); -#endif - #ifdef CONFIG_PPC64 paca_ptrs[cpu]->__current = idle; paca_ptrs[cpu]->kstack = (unsigned long)ti + THREAD_SIZE - STACK_FRAME_OVERHEAD; -#ifdef CONFIG_STACKPROTECTOR - paca_ptrs[cpu]->canary = idle->stack_canary; -#endif #endif ti->cpu = cpu; secondary_ti = current_set[cpu] = ti; @@ -1316,6 +1310,8 @@ void start_secondary(void *unused) notify_cpu_starting(cpu); set_cpu_online(cpu, true); + boot_init_stack_canary(); + local_irq_enable(); /* We can enable ftrace for secondary cpus now */