diff options
author | Jacob Pan <jacob.jun.pan@intel.com> | 2009-09-17 10:36:43 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-02-19 19:25:17 -0500 |
commit | 35f720c5930f689647d51ad77e2a8d6f0abf66c8 (patch) | |
tree | 0b229f8ccb46d0cecf3698ef4cadb8232f105b58 /arch | |
parent | d39f6495f66616b637260405d0b5dc2656bc490e (diff) |
x86: Initialize stack canary in secondary start
Some secondary clockevent setup code needs to call request_irq, which
will cause fake stack check failure in schedule() if voluntary
preemption model is chosen. It is safe to have stack canary
initialized here early, since start_secondary() does not return.
Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com>
LKML-Reference: <43F901BD926A4E43B106BF17856F07559FB80D02@orsmsx508.amr.corp.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/smpboot.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index b4e870cbdc60..3e6150d421e4 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/err.h> | 48 | #include <linux/err.h> |
49 | #include <linux/nmi.h> | 49 | #include <linux/nmi.h> |
50 | #include <linux/tboot.h> | 50 | #include <linux/tboot.h> |
51 | #include <linux/stackprotector.h> | ||
51 | 52 | ||
52 | #include <asm/acpi.h> | 53 | #include <asm/acpi.h> |
53 | #include <asm/desc.h> | 54 | #include <asm/desc.h> |
@@ -324,6 +325,9 @@ notrace static void __cpuinit start_secondary(void *unused) | |||
324 | /* enable local interrupts */ | 325 | /* enable local interrupts */ |
325 | local_irq_enable(); | 326 | local_irq_enable(); |
326 | 327 | ||
328 | /* to prevent fake stack check failure in clock setup */ | ||
329 | boot_init_stack_canary(); | ||
330 | |||
327 | x86_cpuinit.setup_percpu_clockev(); | 331 | x86_cpuinit.setup_percpu_clockev(); |
328 | 332 | ||
329 | wmb(); | 333 | wmb(); |