diff options
Diffstat (limited to 'arch/um/kernel/process_kern.c')
-rw-r--r-- | arch/um/kernel/process_kern.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c index ba8a52c1f7ae..f6a5a502120b 100644 --- a/arch/um/kernel/process_kern.c +++ b/arch/um/kernel/process_kern.c | |||
@@ -156,9 +156,25 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, | |||
156 | unsigned long stack_top, struct task_struct * p, | 156 | unsigned long stack_top, struct task_struct * p, |
157 | struct pt_regs *regs) | 157 | struct pt_regs *regs) |
158 | { | 158 | { |
159 | int ret; | ||
160 | |||
159 | p->thread = (struct thread_struct) INIT_THREAD; | 161 | p->thread = (struct thread_struct) INIT_THREAD; |
160 | return(CHOOSE_MODE_PROC(copy_thread_tt, copy_thread_skas, nr, | 162 | ret = CHOOSE_MODE_PROC(copy_thread_tt, copy_thread_skas, nr, |
161 | clone_flags, sp, stack_top, p, regs)); | 163 | clone_flags, sp, stack_top, p, regs); |
164 | |||
165 | if (ret || !current->thread.forking) | ||
166 | goto out; | ||
167 | |||
168 | clear_flushed_tls(p); | ||
169 | |||
170 | /* | ||
171 | * Set a new TLS for the child thread? | ||
172 | */ | ||
173 | if (clone_flags & CLONE_SETTLS) | ||
174 | ret = arch_copy_tls(p); | ||
175 | |||
176 | out: | ||
177 | return ret; | ||
162 | } | 178 | } |
163 | 179 | ||
164 | void initial_thread_cb(void (*proc)(void *), void *arg) | 180 | void initial_thread_cb(void (*proc)(void *), void *arg) |