[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-cd493a6deb8b78eca280d05f7fa73fd69403ae29@git.kernel.org>
Date: Thu, 2 Nov 2017 03:56:01 -0700
From: tip-bot for Andy Lutomirski <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: peterz@...radead.org, luto@...nel.org, mingo@...nel.org,
dave.hansen@...el.com, hpa@...or.com, bp@...e.de,
torvalds@...ux-foundation.org, brgerst@...il.com, bpetkov@...e.de,
linux-kernel@...r.kernel.org, tglx@...utronix.de
Subject: [tip:x86/asm] x86/entry/32: Fix cpu_current_top_of_stack
initialization at boot
Commit-ID: cd493a6deb8b78eca280d05f7fa73fd69403ae29
Gitweb: https://git.kernel.org/tip/cd493a6deb8b78eca280d05f7fa73fd69403ae29
Author: Andy Lutomirski <luto@...nel.org>
AuthorDate: Thu, 2 Nov 2017 00:59:15 -0700
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Thu, 2 Nov 2017 11:04:47 +0100
x86/entry/32: Fix cpu_current_top_of_stack initialization at boot
cpu_current_top_of_stack's initialization forgot about
TOP_OF_KERNEL_STACK_PADDING. This bug didn't matter because the
idle threads never enter user mode.
Signed-off-by: Andy Lutomirski <luto@...nel.org>
Reviewed-by: Borislav Petkov <bp@...e.de>
Cc: Borislav Petkov <bpetkov@...e.de>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Dave Hansen <dave.hansen@...el.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/e5e370a7e6e4fddd1c4e4cf619765d96bb874b21.1509609304.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/kernel/smpboot.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index ad59edd..06c18fe 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -961,8 +961,7 @@ void common_cpu_up(unsigned int cpu, struct task_struct *idle)
#ifdef CONFIG_X86_32
/* Stack for startup_32 can be just as for start_secondary onwards */
irq_ctx_init(cpu);
- per_cpu(cpu_current_top_of_stack, cpu) =
- (unsigned long)task_stack_page(idle) + THREAD_SIZE;
+ per_cpu(cpu_current_top_of_stack, cpu) = task_top_of_stack(idle);
#else
initial_gs = per_cpu_offset(cpu);
#endif
Powered by blists - more mailing lists