kernel/fork.c: add comment about usage of CLONE_FS flags and namespaces
Subsystems (3)
[email protected]
maintainerPATCH 61/114 kernel/fork.c: add comment about usage of CLONE_FS flags and namespaces
From: Marcos Paulo de Souza <[email protected]>
Subject: kernel/fork.c: add comment about usage of CLONE_FS flags and namespaces
All other places that deals with namespaces have an explanation of why the restriction is there. The description added in this commit was based on e66eded8309eb ("userns: Don't allow CLONE_NEWUSER | CLONE_FS").
Signed-off-by Marcos Paulo de Souza <[email protected]>
Cc "Eric W. Biederman" <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
kernel/fork.c | 4 ++++ 1 file changed, 4 insertions(+)
kernel/fork.c renamed from kernel/fork.c~forkc-add-doc-about-usage-of-clone_fs-flags-and-namespaces +4 -0
@@ -1587,6 +1587,10 @@ static __latent_entropy struct task_struint retval;struct task_struct *p; +/* +* Don't allow sharing the root directory with processes in a different +* namespace +*/ if ((clone_flags & (CLONE_NEWNS |CLONE_FS )) == (CLONE_NEWNS |CLONE_FS ))return ERR_PTR (-EINVAL );
_