diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2011-03-23 19:43:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-23 22:46:58 -0400 |
commit | 4308eebbeb2026827d4492ce8c23d99f7f144a82 (patch) | |
tree | 3781e227988b4d986bf98dcc0390df17c6fe8f10 /kernel/fork.c | |
parent | 45a68628d37222e655219febce9e91b6484789b2 (diff) |
pidns: call pid_ns_prepare_proc() from create_pid_namespace()
Reorganize proc_get_sb() so it can be called before the struct pid of the
first process is allocated.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Serge E. Hallyn <serge@hallyn.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 17aed4378eda..457fff2e17e0 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); |