aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/kernel/nsproxy.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-08-02 14:36:19 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-08-02 14:36:19 -0700
commitd7b767b5088d57ff9b5f9a0060c9ad0f9410b1c0 (patch)
tree377247ed59febb6aa236adbbeca15d3d3aea09f7 /kernel/nsproxy.c
parentMerge tag 'seccomp-v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux (diff)
parentexec: Call kmap_local_page() in copy_string_kernel() (diff)
downloadwireguard-linux-d7b767b5088d57ff9b5f9a0060c9ad0f9410b1c0.tar.xz
wireguard-linux-d7b767b5088d57ff9b5f9a0060c9ad0f9410b1c0.zip
Merge tag 'execve-v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull execve updates from Kees Cook: - Allow unsharing time namespace on vfork+exec (Andrei Vagin) - Replace usage of deprecated kmap APIs (Fabio M. De Francesco) - Fix spelling mistake (Zhang Jiaming) * tag 'execve-v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: exec: Call kmap_local_page() in copy_string_kernel() exec: Fix a spelling mistake selftests/timens: add a test for vfork+exit fs/exec: allow to unshare a time namespace on vfork+exec
Diffstat (limited to 'kernel/nsproxy.c')
-rw-r--r--kernel/nsproxy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index eec72ca962e2..b4cbb406bc28 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -179,7 +179,8 @@ int copy_namespaces(unsigned long flags, struct task_struct *tsk)
if (IS_ERR(new_ns))
return PTR_ERR(new_ns);
- timens_on_fork(new_ns, tsk);
+ if ((flags & CLONE_VM) == 0)
+ timens_on_fork(new_ns, tsk);
tsk->nsproxy = new_ns;
return 0;