All of lore.kernel.org
 help / color / mirror / Atom feed
From: tobias@gambas-buch.de (Tobias Boege)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Question: copy_process() and CLONE_NEWNS
Date: Fri, 1 Feb 2013 12:58:01 +0100	[thread overview]
Message-ID: <20130201115801.GB982@aurora> (raw)
In-Reply-To: <CAGXs5wUkrdbOv35JbZfhg5OF5RkPzfdnZmXjt0EWnDD94WW-5Q@mail.gmail.com>

On Fri, 01 Feb 2013, Kevin Wilson wrote:
> Hi all,
> question:
> 
> In copy_process() we have:
> 
> static struct task_struct *copy_process(unsigned long clone_flags,
>                                          unsigned long stack_start,
>                                          struct pt_regs *regs,
>                                          unsigned long stack_size,
>                                          int __user *child_tidptr,
>                                          struct pid *pid,
>                                          int trace)
>  {
>          int retval;
>          struct task_struct *p;
>          int cgroup_callbacks_done = 0;
> 
>          if ((clone_flags & (CLONE_NEWNS|CLONE_FS)) == (CLONE_NEWNS|CLONE_FS))
>                  return ERR_PTR(-EINVAL);
>  ...
> ...
> 
> 
> see :http://lxr.free-electrons.com/source/kernel/fork.c#L1128
> 
> Why is the CLONE_NEWNS, when set, cause an error in copy_process(), as
> shown above ?
> is it not permitted that CLONE_NEWNS will be set ?

It seems so :-)

clone(2)'s manpage also says:

"It is not permitted to specify both CLONE_NEWNS and CLONE_FS in the same
clone() call."

Regards,
Tobi

  reply	other threads:[~2013-02-01 11:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-01  6:24 Question: copy_process() and CLONE_NEWNS Kevin Wilson
2013-02-01 11:58 ` Tobias Boege [this message]
2013-02-04 16:21   ` Valdis.Kletnieks at vt.edu
2013-02-01 12:22 ` Denis Kirjanov

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=20130201115801.GB982@aurora \
    --to=tobias@gambas-buch.de \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.