Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1727767 > unrolled thread

[RFC 15/17] x86/boot/32: Fix cpu_current_top_of_stack initialization at boot

Started byAndy Lutomirski <luto@kernel.org>
First post2017-09-06 23:40 +0200
Last post2017-09-06 23:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [RFC 15/17] x86/boot/32: Fix cpu_current_top_of_stack initialization at boot Andy Lutomirski <luto@kernel.org> - 2017-09-06 23:40 +0200

#1727767 — [RFC 15/17] x86/boot/32: Fix cpu_current_top_of_stack initialization at boot

FromAndy Lutomirski <luto@kernel.org>
Date2017-09-06 23:40 +0200
Subject[RFC 15/17] x86/boot/32: Fix cpu_current_top_of_stack initialization at boot
Message-ID<umQdd-7qi-37@gated-at.bofh.it>
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@kernel.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 b474c8de7fba..e6544bac7c51 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -958,8 +958,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
-- 
2.13.5

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web