diff options
| author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-08 11:29:45 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-08 11:29:45 +0000 |
| commit | 07afa01813d547570a762034f0dce7fd8baa8b3d (patch) | |
| tree | 5b0a34f64e0f0e824ea153adeb6c98b98dd852ac /kernel/fork.c | |
| parent | 01a61f490cab732542753db69e17e5db657d185a (diff) | |
| parent | 3b4bc7bccc7857274705b05cf81a0c72cfd0b0dd (diff) | |
Merge remote-tracking branch 'asoc/fix/pxa' into asoc-pxa
Diffstat (limited to 'kernel/fork.c')
| -rw-r--r-- | kernel/fork.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index a31b823b3c2d..65ca6d27f24e 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -1166,6 +1166,14 @@ static struct task_struct *copy_process(unsigned long clone_flags, current->signal->flags & SIGNAL_UNKILLABLE) return ERR_PTR(-EINVAL); + /* + * If the new process will be in a different pid namespace + * don't allow the creation of threads. + */ + if ((clone_flags & (CLONE_VM|CLONE_NEWPID)) && + (task_active_pid_ns(current) != current->nsproxy->pid_ns)) + return ERR_PTR(-EINVAL); + retval = security_task_create(clone_flags); if (retval) goto fork_out; |
