]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
x86: Initialize stack canary in secondary start
authorJacob Pan <jacob.jun.pan@intel.com>
Thu, 17 Sep 2009 14:36:43 +0000 (07:36 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Sat, 20 Feb 2010 00:25:17 +0000 (16:25 -0800)
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>
arch/x86/kernel/smpboot.c

index b4e870cbdc60eb1244b74c2b5c1bb83fc766fd17..3e6150d421e4d7cc602f3198247da6f504f60ea9 100644 (file)
@@ -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();