aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/kernel/process.c')
-rw-r--r--arch/um/kernel/process.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index b6d699cdd557..b462b13c5bae 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -161,8 +161,7 @@ void fork_handler(void)
161} 161}
162 162
163int copy_thread(unsigned long clone_flags, unsigned long sp, 163int copy_thread(unsigned long clone_flags, unsigned long sp,
164 unsigned long arg, struct task_struct * p, 164 unsigned long arg, struct task_struct * p)
165 struct pt_regs *regs)
166{ 165{
167 void (*handler)(void); 166 void (*handler)(void);
168 int kthread = current->flags & PF_KTHREAD; 167 int kthread = current->flags & PF_KTHREAD;
@@ -171,7 +170,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
171 p->thread = (struct thread_struct) INIT_THREAD; 170 p->thread = (struct thread_struct) INIT_THREAD;
172 171
173 if (!kthread) { 172 if (!kthread) {
174 memcpy(&p->thread.regs.regs, &regs->regs, 173 memcpy(&p->thread.regs.regs, current_pt_regs(),
175 sizeof(p->thread.regs.regs)); 174 sizeof(p->thread.regs.regs));
176 PT_REGS_SET_SYSCALL_RETURN(&p->thread.regs, 0); 175 PT_REGS_SET_SYSCALL_RETURN(&p->thread.regs, 0);
177 if (sp != 0) 176 if (sp != 0)