Commit 8cf2c519 authored by Andi Kleen's avatar Andi Kleen Committed by Andi Kleen

[PATCH] x86: Revert new unwind kernel stack termination

Jan convinced me that it was unnecessary because the assembly stubs do
this already on the stack.

Cc: jbeulich@novell.com
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent 6bf2dafa
...@@ -336,7 +336,6 @@ extern void kernel_thread_helper(void); ...@@ -336,7 +336,6 @@ extern void kernel_thread_helper(void);
int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
{ {
struct pt_regs regs; struct pt_regs regs;
int err;
memset(&regs, 0, sizeof(regs)); memset(&regs, 0, sizeof(regs));
...@@ -351,10 +350,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) ...@@ -351,10 +350,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
regs.eflags = X86_EFLAGS_IF | X86_EFLAGS_SF | X86_EFLAGS_PF | 0x2; regs.eflags = X86_EFLAGS_IF | X86_EFLAGS_SF | X86_EFLAGS_PF | 0x2;
/* Ok, create the new process.. */ /* Ok, create the new process.. */
err = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL); return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
if (err == 0) /* terminate kernel stack */
task_pt_regs(current)->eip = 0;
return err;
} }
EXPORT_SYMBOL(kernel_thread); EXPORT_SYMBOL(kernel_thread);
......
...@@ -980,11 +980,6 @@ ENTRY(kernel_thread) ...@@ -980,11 +980,6 @@ ENTRY(kernel_thread)
call do_fork call do_fork
movq %rax,RAX(%rsp) movq %rax,RAX(%rsp)
xorl %edi,%edi xorl %edi,%edi
test %rax,%rax
jnz 1f
/* terminate stack in child */
movq %rdi,RIP(%rsp)
1:
/* /*
* It isn't worth to check for reschedule here, * It isn't worth to check for reschedule here,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment