diff options
| author | Ingo Molnar <mingo@kernel.org> | 2013-03-21 11:03:10 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2013-03-21 11:03:10 +0100 |
| commit | 3bf2391729822e591dcfbbd1e9dd2f450968cdcb (patch) | |
| tree | 80a0499e57a4cc95b6caea559400b5226ebe606f /kernel/fork.c | |
| parent | 86e213e1d901fbeaf6e57d13c5edd925fadddcbe (diff) | |
| parent | fd4a5aef002bb57e8a35ed34d8a878034b9bde94 (diff) | |
Merge branch 'perf/urgent' into perf/core
Merge in all pending fixes, before pulling the latest development
bits from Arnaldo - which will involve merge conflicts.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/fork.c')
| -rw-r--r-- | kernel/fork.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 8d932b1c9056..1766d324d5e3 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -1141,6 +1141,9 @@ static struct task_struct *copy_process(unsigned long clone_flags, if ((clone_flags & (CLONE_NEWNS|CLONE_FS)) == (CLONE_NEWNS|CLONE_FS)) return ERR_PTR(-EINVAL); + if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS)) + return ERR_PTR(-EINVAL); + /* * Thread groups must share signals as well, and detached threads * can only be started up within the thread group. @@ -1807,7 +1810,7 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags) * If unsharing a user namespace must also unshare the thread. */ if (unshare_flags & CLONE_NEWUSER) - unshare_flags |= CLONE_THREAD; + unshare_flags |= CLONE_THREAD | CLONE_FS; /* * If unsharing a pid namespace must also unshare the thread. */ |
