diff options
author | Oleg Nesterov <oleg@redhat.com> | 2013-09-11 23:19:41 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-12 00:56:20 +0200 |
commit | 40a0d32d1eaffe6aac7324ca92604b6b3977eb0e (patch) | |
tree | c736993570ca2b16f0b7963226fda1947ec2c6b8 /drivers/vhost | |
parent | pidns: kill the unnecessary CLONE_NEWPID in copy_process() (diff) | |
download | linux-40a0d32d1eaffe6aac7324ca92604b6b3977eb0e.tar.xz linux-40a0d32d1eaffe6aac7324ca92604b6b3977eb0e.zip |
fork: unify and tighten up CLONE_NEWUSER/CLONE_NEWPID checks
do_fork() denies CLONE_THREAD | CLONE_PARENT if NEWUSER | NEWPID.
Then later copy_process() denies CLONE_SIGHAND if the new process will
be in a different pid namespace (task_active_pid_ns() doesn't match
current->nsproxy->pid_ns).
This looks confusing and inconsistent. CLONE_NEWPID is very similar to
the case when ->pid_ns was already unshared, we want the same
restrictions so copy_process() should also nack CLONE_PARENT.
And it would be better to deny CLONE_NEWUSER && CLONE_SIGHAND as well
just for consistency.
Kill the "CLONE_NEWUSER | CLONE_NEWPID" check in do_fork() and change
copy_process() to do the same check along with ->pid_ns check we already
have.
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 'drivers/vhost')
0 files changed, 0 insertions, 0 deletions