diff options
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index f2b494d7c557..e7548dee636b 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1187,12 +1187,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1187 | pid = alloc_pid(p->nsproxy->pid_ns); | 1187 | pid = alloc_pid(p->nsproxy->pid_ns); |
1188 | if (!pid) | 1188 | if (!pid) |
1189 | goto bad_fork_cleanup_io; | 1189 | goto bad_fork_cleanup_io; |
1190 | |||
1191 | if (clone_flags & CLONE_NEWPID) { | ||
1192 | retval = pid_ns_prepare_proc(p->nsproxy->pid_ns); | ||
1193 | if (retval < 0) | ||
1194 | goto bad_fork_free_pid; | ||
1195 | } | ||
1196 | } | 1190 | } |
1197 | 1191 | ||
1198 | p->pid = pid_nr(pid); | 1192 | p->pid = pid_nr(pid); |
@@ -1211,6 +1205,9 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1211 | * Clear TID on mm_release()? | 1205 | * Clear TID on mm_release()? |
1212 | */ | 1206 | */ |
1213 | p->clear_child_tid = (clone_flags & CLONE_CHILD_CLEARTID) ? child_tidptr: NULL; | 1207 | p->clear_child_tid = (clone_flags & CLONE_CHILD_CLEARTID) ? child_tidptr: NULL; |
1208 | #ifdef CONFIG_BLOCK | ||
1209 | p->plug = NULL; | ||
1210 | #endif | ||
1214 | #ifdef CONFIG_FUTEX | 1211 | #ifdef CONFIG_FUTEX |
1215 | p->robust_list = NULL; | 1212 | p->robust_list = NULL; |
1216 | #ifdef CONFIG_COMPAT | 1213 | #ifdef CONFIG_COMPAT |
@@ -1296,7 +1293,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1296 | tracehook_finish_clone(p, clone_flags, trace); | 1293 | tracehook_finish_clone(p, clone_flags, trace); |
1297 | 1294 | ||
1298 | if (thread_group_leader(p)) { | 1295 | if (thread_group_leader(p)) { |
1299 | if (clone_flags & CLONE_NEWPID) | 1296 | if (is_child_reaper(pid)) |
1300 | p->nsproxy->pid_ns->child_reaper = p; | 1297 | p->nsproxy->pid_ns->child_reaper = p; |
1301 | 1298 | ||
1302 | p->signal->leader_pid = pid; | 1299 | p->signal->leader_pid = pid; |