diff options
author | Andi Kleen <ak@suse.de> | 2006-10-21 12:37:02 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-10-21 12:37:02 -0400 |
commit | 8cf2c51927bbeefafc25193d01b91f9ed3806e96 (patch) | |
tree | 5618f59fc5a9b98e13465746c170433fa37c3eb7 /arch | |
parent | 6bf2dafad18c119beb534cbb3d882fe7a6c3f529 (diff) |
[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: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/kernel/process.c | 6 | ||||
-rw-r--r-- | arch/x86_64/kernel/entry.S | 5 |
2 files changed, 1 insertions, 10 deletions
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index 57d375900afb..1e1fa3e391a3 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c | |||
@@ -336,7 +336,6 @@ extern void kernel_thread_helper(void); | |||
336 | int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | 336 | int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) |
337 | { | 337 | { |
338 | struct pt_regs regs; | 338 | struct pt_regs regs; |
339 | int err; | ||
340 | 339 | ||
341 | memset(®s, 0, sizeof(regs)); | 340 | memset(®s, 0, sizeof(regs)); |
342 | 341 | ||
@@ -351,10 +350,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | |||
351 | regs.eflags = X86_EFLAGS_IF | X86_EFLAGS_SF | X86_EFLAGS_PF | 0x2; | 350 | regs.eflags = X86_EFLAGS_IF | X86_EFLAGS_SF | X86_EFLAGS_PF | 0x2; |
352 | 351 | ||
353 | /* Ok, create the new process.. */ | 352 | /* Ok, create the new process.. */ |
354 | err = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, ®s, 0, NULL, NULL); | 353 | return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, ®s, 0, NULL, NULL); |
355 | if (err == 0) /* terminate kernel stack */ | ||
356 | task_pt_regs(current)->eip = 0; | ||
357 | return err; | ||
358 | } | 354 | } |
359 | EXPORT_SYMBOL(kernel_thread); | 355 | EXPORT_SYMBOL(kernel_thread); |
360 | 356 | ||
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index e3eddde3d3bb..7d401b00d822 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S | |||
@@ -980,11 +980,6 @@ ENTRY(kernel_thread) | |||
980 | call do_fork | 980 | call do_fork |
981 | movq %rax,RAX(%rsp) | 981 | movq %rax,RAX(%rsp) |
982 | xorl %edi,%edi | 982 | xorl %edi,%edi |
983 | test %rax,%rax | ||
984 | jnz 1f | ||
985 | /* terminate stack in child */ | ||
986 | movq %rdi,RIP(%rsp) | ||
987 | 1: | ||
988 | 983 | ||
989 | /* | 984 | /* |
990 | * It isn't worth to check for reschedule here, | 985 | * It isn't worth to check for reschedule here, |