path: root/init/calibrate.c
diff options
authorOleg Nesterov <>2011-03-22 16:34:09 -0700
committerLinus Torvalds <>2011-03-22 17:44:11 -0700
commit9bfb23fc4a481650e60d22dbe84c0fd5a9d49bba (patch)
treea88488a871e6b765dede72ff28db00c71848201d /init/calibrate.c
parent4d51985e484dd11d9047dfcd1278ec9ccfb435d5 (diff)
sys_unshare: remove the dead CLONE_THREAD/SIGHAND/VM code
Cleanup: kill the dead code which does nothing but complicates the code and confuses the reader. sys_unshare(CLONE_THREAD/SIGHAND/VM) is not really implemented, and I doubt very much it will ever work. At least, nobody even tried since the original 99d1419d96d7df9cfa56 ("unshare system call -v5: system call handler function") was applied more than 4 years ago. And the code is not consistent. unshare_thread() always fails unconditionally, while unshare_sighand() and unshare_vm() pretend to work if there is nothing to unshare. Remove unshare_thread(), unshare_sighand(), unshare_vm() helpers and related variables and add a simple CLONE_THREAD | CLONE_SIGHAND| CLONE_VM check into check_unshare_flags(). Also, move the "CLONE_NEWNS needs CLONE_FS" check from check_unshare_flags() to sys_unshare(). This looks more consistent and matches the similar do_sysvsem check in sys_unshare(). Note: with or without this patch "atomic_read(mm->mm_users) > 1" can give a false positive due to get_task_mm(). Signed-off-by: Oleg Nesterov <> Acked-by: Roland McGrath <> Cc: Janak Desai <> Cc: Daniel Lezcano <> Cc: "Eric W. Biederman" <> Cc: KOSAKI Motohiro <> Cc: Alexey Dobriyan <> Acked-by: Serge Hallyn <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'init/calibrate.c')
0 files changed, 0 insertions, 0 deletions