aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index b373322ca497..9bd7b65ee418 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1534,6 +1534,12 @@ asmlinkage long sys_unshare(unsigned long unshare_flags)
1534 1534
1535 check_unshare_flags(&unshare_flags); 1535 check_unshare_flags(&unshare_flags);
1536 1536
1537 /* Return -EINVAL for all unsupported flags */
1538 err = -EINVAL;
1539 if (unshare_flags & ~(CLONE_THREAD|CLONE_FS|CLONE_NEWNS|CLONE_SIGHAND|
1540 CLONE_VM|CLONE_FILES|CLONE_SYSVSEM))
1541 goto bad_unshare_out;
1542
1537 if ((err = unshare_thread(unshare_flags))) 1543 if ((err = unshare_thread(unshare_flags)))
1538 goto bad_unshare_out; 1544 goto bad_unshare_out;
1539 if ((err = unshare_fs(unshare_flags, &new_fs))) 1545 if ((err = unshare_fs(unshare_flags, &new_fs)))