From: Serge Hallyn <serge.hallyn@ubuntu.com>
To: "Raphael S.Carvalho" <raphael.scarv@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Serge Hallyn <serge.hallyn@canonical.com>,
"David S. Miller" <davem@davemloft.net>,
"Serge E. Hallyn" <serge@hallyn.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] kernel/nsproxy.c: Improving a snippet of code.
Date: Wed, 27 Feb 2013 14:09:07 -0600 [thread overview]
Message-ID: <20130227200907.GA19205@sergelap> (raw)
In-Reply-To: <1361989929-1145-1-git-send-email-raphael.scarv@gmail.com>
Quoting Raphael S.Carvalho (raphael.scarv@gmail.com):
> It seems GCC generates a better code in that way, so I changed that statement.
> Btw, they have the same semantic, so I'm sending this patch due to performance issues.
>
> Signed-off-by: Raphael S.Carvalho <raphael.scarv@gmail.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
> ---
> kernel/nsproxy.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
> index 78e2ecb..21da3d1 100644
> --- a/kernel/nsproxy.c
> +++ b/kernel/nsproxy.c
> @@ -148,7 +148,8 @@ int copy_namespaces(unsigned long flags, struct task_struct *tsk)
> * means share undolist with parent, so we must forbid using
> * it along with CLONE_NEWIPC.
> */
> - if ((flags & CLONE_NEWIPC) && (flags & CLONE_SYSVSEM)) {
> + if ((flags & (CLONE_NEWIPC | CLONE_SYSVSEM)) ==
> + (CLONE_NEWIPC | CLONE_SYSVSEM)) {
> err = -EINVAL;
> goto out;
> }
> --
> 1.7.2.5
>
next prev parent reply other threads:[~2013-02-27 20:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-27 18:32 [PATCH 1/1] kernel/nsproxy.c: Improving a snippet of code Raphael S.Carvalho
2013-02-27 20:09 ` Serge Hallyn [this message]
2013-02-27 23:14 ` Eric W. Biederman
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=20130227200907.GA19205@sergelap \
--to=serge.hallyn@ubuntu.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=raphael.scarv@gmail.com \
--cc=serge.hallyn@canonical.com \
--cc=serge@hallyn.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