mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fork.c: Add doc about usage of CLONE_FS flags and namespaces
@ 2017-11-12 15:16 Marcos Paulo de Souza
  0 siblings, 0 replies; only message in thread
From: Marcos Paulo de Souza @ 2017-11-12 15:16 UTC (permalink / raw)
  Cc: Marcos Paulo de Souza, Ingo Molnar, Andrew Morton,
	Thomas Gleixner, Peter Zijlstra, Oleg Nesterov,
	Frederic Weisbecker, Hoeun Ryu, Sherry Yang, Vegard Nossum,
	Andrea Arcangeli, Christoph Lameter, Tetsuo Handa, linux-kernel

All other places that deals with namespaces have an explanation of why
the restriction is there. The description added in this commit was based
in e66eded8309eb.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
---
 kernel/fork.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/fork.c b/kernel/fork.c
index 07cc743698d3..29cb72b64900 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1549,6 +1549,10 @@ static __latent_entropy struct task_struct *copy_process(
 	int 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);
 
-- 
2.13.6

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-12 15:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-12 15:16 [PATCH] fork.c: Add doc about usage of CLONE_FS flags and namespaces Marcos Paulo de Souza

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®