aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/process_64.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2008-05-12 09:44:31 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-26 10:15:31 -0400
commitce22bd92cba0958e052cb1ce0f89f1d3a02b60a7 (patch)
tree48ab1d23836a9844b9848a5f4a075ceefe82aeef /arch/x86/kernel/process_64.c
parente00320875d0cc5f8099a7227b2f25fbb3231268d (diff)
x86: setup stack canary for the idle threads
The idle threads for non-boot CPUs are a bit special in how they are created; the result is that these don't have the stack canary set up properly in their PDA. Easiest fix is to just always set the PDA up correctly when entering the idle thread; this is a NOP for the boot cpu. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/process_64.c')
-rw-r--r--arch/x86/kernel/process_64.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index d8640388039e..9e69e223023e 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -146,6 +146,15 @@ static inline void play_dead(void)
146void cpu_idle(void) 146void cpu_idle(void)
147{ 147{
148 current_thread_info()->status |= TS_POLLING; 148 current_thread_info()->status |= TS_POLLING;
149
150#ifdef CONFIG_CC_STACKPROTECTOR
151 /*
152 * If we're the non-boot CPU, nothing set the PDA stack
153 * canary up for us. This is as good a place as any for
154 * doing that.
155 */
156 write_pda(stack_canary, current->stack_canary);
157#endif
149 /* endless idle loop with no priority at all */ 158 /* endless idle loop with no priority at all */
150 while (1) { 159 while (1) {
151 tick_nohz_stop_sched_tick(); 160 tick_nohz_stop_sched_tick();