mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Marcos Paulo de Souza <marcos.souza.org@gmail.com>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Oleg Nesterov <oleg@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Hoeun Ryu <hoeun.ryu@gmail.com>,
	Sherry Yang <sherryy@android.com>,
	Vegard Nossum <vegard.nossum@oracle.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Christoph Lameter <cl@linux.com>,
	Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] fork.c: Add doc about usage of CLONE_FS flags and namespaces
Date: Sun, 12 Nov 2017 13:16:27 -0200	[thread overview]
Message-ID: <20171112151637.13258-1-marcos.souza.org@gmail.com> (raw)

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

                 reply	other threads:[~2017-11-12 15:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171112151637.13258-1-marcos.souza.org@gmail.com \
    --to=marcos.souza.org@gmail.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=fweisbec@gmail.com \
    --cc=hoeun.ryu@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=peterz@infradead.org \
    --cc=sherryy@android.com \
    --cc=tglx@linutronix.de \
    --cc=vegard.nossum@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®