diff options
Diffstat (limited to 'kernel/cpu')
| -rw-r--r-- | kernel/cpu/idle.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/cpu/idle.c b/kernel/cpu/idle.c index d5585f5e038e..bf2ee1aafa0e 100644 --- a/kernel/cpu/idle.c +++ b/kernel/cpu/idle.c | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include <linux/cpu.h> | 5 | #include <linux/cpu.h> |
| 6 | #include <linux/tick.h> | 6 | #include <linux/tick.h> |
| 7 | #include <linux/mm.h> | 7 | #include <linux/mm.h> |
| 8 | #include <linux/stackprotector.h> | ||
| 8 | 9 | ||
| 9 | #include <asm/tlb.h> | 10 | #include <asm/tlb.h> |
| 10 | 11 | ||
| @@ -112,6 +113,21 @@ static void cpu_idle_loop(void) | |||
| 112 | 113 | ||
| 113 | void cpu_startup_entry(enum cpuhp_state state) | 114 | void cpu_startup_entry(enum cpuhp_state state) |
| 114 | { | 115 | { |
| 116 | /* | ||
| 117 | * This #ifdef needs to die, but it's too late in the cycle to | ||
| 118 | * make this generic (arm and sh have never invoked the canary | ||
| 119 | * init for the non boot cpus!). Will be fixed in 3.11 | ||
| 120 | */ | ||
| 121 | #ifdef CONFIG_X86 | ||
| 122 | /* | ||
| 123 | * If we're the non-boot CPU, nothing set the stack canary up | ||
| 124 | * for us. The boot CPU already has it initialized but no harm | ||
| 125 | * in doing it again. This is a good place for updating it, as | ||
| 126 | * we wont ever return from this function (so the invalid | ||
| 127 | * canaries already on the stack wont ever trigger). | ||
| 128 | */ | ||
| 129 | boot_init_stack_canary(); | ||
| 130 | #endif | ||
| 115 | current_set_polling(); | 131 | current_set_polling(); |
| 116 | arch_cpu_idle_prepare(); | 132 | arch_cpu_idle_prepare(); |
| 117 | cpu_idle_loop(); | 133 | cpu_idle_loop(); |
