summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Pan <jacob.jun.pan@intel.com>2009-09-17 07:36:43 -0700
committerH. Peter Anvin <hpa@zytor.com>2010-02-19 16:25:17 -0800
commit35f720c5930f689647d51ad77e2a8d6f0abf66c8 (patch)
tree0b229f8ccb46d0cecf3698ef4cadb8232f105b58
parentd39f6495f66616b637260405d0b5dc2656bc490e (diff)
downloadblackbird-obmc-linux-35f720c5930f689647d51ad77e2a8d6f0abf66c8.tar.gz
blackbird-obmc-linux-35f720c5930f689647d51ad77e2a8d6f0abf66c8.zip
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>
-rw-r--r--arch/x86/kernel/smpboot.c4
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 @@
#include <linux/err.h>
#include <linux/nmi.h>
#include <linux/tboot.h>
+#include <linux/stackprotector.h>
#include <asm/acpi.h>
#include <asm/desc.h>
@@ -324,6 +325,9 @@ notrace static void __cpuinit start_secondary(void *unused)
/* enable local interrupts */
local_irq_enable();
+ /* to prevent fake stack check failure in clock setup */
+ boot_init_stack_canary();
+
x86_cpuinit.setup_percpu_clockev();
wmb();
OpenPOWER on IntegriCloud