aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-09-20 08:38:55 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-09-20 08:38:55 -0700
commitf489921dba468b3d208a5234dcbf7f21a615f395 (patch)
tree1d8f3389edc506689e0bd62c4fe64414ce4d0f9d /kernel/fork.c
parent521a547ced6477c54b4b0cc206000406c221b4d6 (diff)
parent33a2d6bc3480f9f8ac8c8def29854f98cc8bfee2 (diff)
downloadlinux-f489921dba468b3d208a5234dcbf7f21a615f395.tar.gz
Merge tag 'execve-v6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull execve reverts from Kees Cook: "The recent work to support time namespace unsharing turns out to have some undesirable corner cases, so rather than allowing the API to stay exposed for another release, it'd be best to remove it ASAP, with the replacement getting another cycle of testing. Nothing is known to use this yet, so no userspace breakage is expected. For more details, see: https://lore.kernel.org/lkml/ed418e43ad28b8688cfea2b7c90fce1c@ispras.ru Summary: - Remove the recent 'unshare time namespace on vfork+exec' feature (Andrei Vagin)" * tag 'execve-v6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: Revert "fs/exec: allow to unshare a time namespace on vfork+exec" Revert "selftests/timens: add a test for vfork+exit"
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 8a9e92068b150..2b6bd511c6ed1 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -2047,11 +2047,8 @@ static __latent_entropy struct task_struct *copy_process(
/*
* If the new process will be in a different time namespace
* do not allow it to share VM or a thread group with the forking task.
- *
- * On vfork, the child process enters the target time namespace only
- * after exec.
*/
- if ((clone_flags & (CLONE_VM | CLONE_VFORK)) == CLONE_VM) {
+ if (clone_flags & (CLONE_THREAD | CLONE_VM)) {
if (nsp->time_ns != nsp->time_ns_for_children)
return ERR_PTR(-EINVAL);
}