diff options
| author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-03 18:15:57 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-03 18:15:57 +0100 |
| commit | a7c1a644e16400a33e122f2b03c6a34240001b49 (patch) | |
| tree | 21c2dbede682ed656d1660d7fee657d3aea2c4f1 /kernel/fork.c | |
| parent | ec20fba77df4053ef703900be882527b95606592 (diff) | |
| parent | c6f9b1eb0e5df468891eff17f981b76c86f95f3a (diff) | |
Merge branch 'fix/samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-samsung
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 8d932b1c905..1766d324d5e 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. */ |
