diff options
author | Oleg Nesterov <oleg@redhat.com> | 2013-09-11 14:19:40 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-11 15:56:19 -0700 |
commit | 5167246a8ad617df55717c2d901da5e2aedffcfa (patch) | |
tree | 170259b1cad5dd2f1ff6bd46db39a2ac25aa07b4 /Documentation/namespaces | |
parent | e79f525e99b04390ca4d2366309545a836c03bf1 (diff) | |
download | blackbird-op-linux-5167246a8ad617df55717c2d901da5e2aedffcfa.tar.gz blackbird-op-linux-5167246a8ad617df55717c2d901da5e2aedffcfa.zip |
pidns: kill the unnecessary CLONE_NEWPID in copy_process()
Commit 8382fcac1b81 ("pidns: Outlaw thread creation after
unshare(CLONE_NEWPID)") nacks CLONE_NEWPID if the forking process
unshared pid_ns. This is correct but unnecessary, copy_pid_ns() does
the same check.
Remove the CLONE_NEWPID check to cleanup the code and prepare for the
next change.
Test-case:
static int child(void *arg)
{
return 0;
}
static char stack[16 * 1024];
int main(void)
{
pid_t pid;
assert(unshare(CLONE_NEWUSER | CLONE_NEWPID) == 0);
pid = clone(child, stack + sizeof(stack) / 2,
CLONE_NEWPID | SIGCHLD, NULL);
assert(pid < 0 && errno == EINVAL);
return 0;
}
clone(CLONE_NEWPID) correctly fails with or without this change.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Andy Lutomirski <luto@amacapital.net>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Colin Walters <walters@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/namespaces')
0 files changed, 0 insertions, 0 deletions