summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/process.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-10-11 04:23:29 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2012-10-12 19:35:23 +0200
commit9fff2fa0db911b0b75ec1f9bec72460c0a676ef5 (patch)
tree38fd00adc9bde62de1d5f6346dc670e0e599068f /arch/arm/kernel/process.c
parentx86, um: convert to saner kernel_execve() semantics (diff)
downloadlinux-9fff2fa0db911b0b75ec1f9bec72460c0a676ef5.tar.xz
linux-9fff2fa0db911b0b75ec1f9bec72460c0a676ef5.zip
arm: switch to saner kernel_execve() semantics
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/process.c')
-rw-r--r--arch/arm/kernel/process.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index c10e4395bc47..0f83fa2e58e3 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -373,7 +373,6 @@ void release_thread(struct task_struct *dead_task)
}
asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
-asmlinkage void ret_from_kernel_thread(void) __asm__("ret_from_kernel_thread");
int
copy_thread(unsigned long clone_flags, unsigned long stack_start,
@@ -388,13 +387,13 @@ copy_thread(unsigned long clone_flags, unsigned long stack_start,
*childregs = *regs;
childregs->ARM_r0 = 0;
childregs->ARM_sp = stack_start;
- thread->cpu_context.pc = (unsigned long)ret_from_fork;
} else {
+ memset(childregs, 0, sizeof(struct pt_regs));
thread->cpu_context.r4 = stk_sz;
thread->cpu_context.r5 = stack_start;
- thread->cpu_context.pc = (unsigned long)ret_from_kernel_thread;
childregs->ARM_cpsr = SVC_MODE;
}
+ thread->cpu_context.pc = (unsigned long)ret_from_fork;
thread->cpu_context.sp = (unsigned long)childregs;
clear_ptrace_hw_breakpoint(p);