diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/fork.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index ffbc0904794e..80d92e987f21 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1171,10 +1171,11 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1171 | return ERR_PTR(-EINVAL); | 1171 | return ERR_PTR(-EINVAL); |
1172 | 1172 | ||
1173 | /* | 1173 | /* |
1174 | * If the new process will be in a different pid namespace | 1174 | * If the new process will be in a different pid namespace don't |
1175 | * don't allow the creation of threads. | 1175 | * allow it to share a thread group or signal handlers with the |
1176 | * forking task. | ||
1176 | */ | 1177 | */ |
1177 | if ((clone_flags & (CLONE_VM|CLONE_NEWPID)) && | 1178 | if ((clone_flags & (CLONE_SIGHAND | CLONE_NEWPID)) && |
1178 | (task_active_pid_ns(current) != current->nsproxy->pid_ns)) | 1179 | (task_active_pid_ns(current) != current->nsproxy->pid_ns)) |
1179 | return ERR_PTR(-EINVAL); | 1180 | return ERR_PTR(-EINVAL); |
1180 | 1181 | ||