diff options
Diffstat (limited to 'kernel/fork.c')
| -rw-r--r-- | kernel/fork.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index f2c1e7352298..d778016ac1e3 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
| @@ -1403,10 +1403,11 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
| 1403 | goto bad_fork_cleanup_io; | 1403 | goto bad_fork_cleanup_io; |
| 1404 | 1404 | ||
| 1405 | if (pid != &init_struct_pid) { | 1405 | if (pid != &init_struct_pid) { |
| 1406 | retval = -ENOMEM; | ||
| 1407 | pid = alloc_pid(p->nsproxy->pid_ns_for_children); | 1406 | pid = alloc_pid(p->nsproxy->pid_ns_for_children); |
| 1408 | if (!pid) | 1407 | if (IS_ERR(pid)) { |
| 1408 | retval = PTR_ERR(pid); | ||
| 1409 | goto bad_fork_cleanup_io; | 1409 | goto bad_fork_cleanup_io; |
| 1410 | } | ||
| 1410 | } | 1411 | } |
| 1411 | 1412 | ||
| 1412 | p->set_child_tid = (clone_flags & CLONE_CHILD_SETTID) ? child_tidptr : NULL; | 1413 | p->set_child_tid = (clone_flags & CLONE_CHILD_SETTID) ? child_tidptr : NULL; |
