From: Andrew Morton <akpm@linux-foundation.org>
To: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] utsns: fix !CONFIG_UTS_NS behavior
Date: Sun, 25 Mar 2007 01:07:09 -0800 [thread overview]
Message-ID: <20070325010709.5d801f1c.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070323200039.GA15775@sergelap.austin.ibm.com>
On Fri, 23 Mar 2007 15:00:39 -0500 "Serge E. Hallyn" <serue@us.ibm.com> wrote:
> When CONFIG_UTS_NS=n, clone(CLONE_NEWUTS) quietly refuses. So correctly does
> not unshare a new uts namespace, but also does not return -EINVAL.
>
> Fix this to return -EINVAL so the caller knows his request was denied.
>
> Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
>
> ---
>
> include/linux/utsname.h | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> bc350994ac67df8f1b917f9979c065d87757eabe
> diff --git a/include/linux/utsname.h b/include/linux/utsname.h
> index a4555fe..e10267d 100644
> --- a/include/linux/utsname.h
> +++ b/include/linux/utsname.h
> @@ -70,6 +70,8 @@ static inline int unshare_utsname(unsign
>
> static inline int copy_utsname(int flags, struct task_struct *tsk)
> {
> + if (flags & CLONE_NEWUTS)
> + return -EINVAL;
> return 0;
> }
> static inline void put_uts_ns(struct uts_namespace *ns)
I'm assuming that this is 2.6.21 material.
Please review -mm's merge-sys_clone-sys_unshare-nsproxy-and-namespace.patch
- it probably needs to propagate this fix.
next prev parent reply other threads:[~2007-03-25 9:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-23 20:00 Serge E. Hallyn
2007-03-25 9:07 ` Andrew Morton [this message]
2007-03-25 16:16 ` Serge E. Hallyn
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=20070325010709.5d801f1c.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=serue@us.ibm.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®