From: Li Zefan <lizf@cn.fujitsu.com>
To: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Paul Menage <menage@google.com>,
Linux Containers <containers@lists.linux-foundation.org>,
Benjamin Blum <bblum@google.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cgroups: fix pid namespace bug, fix
Date: Fri, 03 Jul 2009 10:38:48 +0800 [thread overview]
Message-ID: <4A4D6F38.8040602@cn.fujitsu.com> (raw)
In-Reply-To: <20090703024304.GA27802@hallyn.com>
>> cp->cgrp = cgrp;
>> - cp->pid_ns = pid_ns;
>> + cp->ns = ns;
>
> Why not just do
>
> cp->ns = get_pid_ns(ns);
>
> here instead of getting and putting at (1) and (2) ?
>
> Both are correct, but this way will take a bit more
> work to verify every time someone comes to look at this.
>
> In fact, (just noticed) yours isn't right, because at (3) you
> will leak the pidns reference.
>
My bad. :(
I did the quick fix without thinking it more.
And I noticed seemingly the similar bug exists in Benjamin's patch...
prev parent reply other threads:[~2009-07-03 2:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-03 1:41 [PATCH] cgroups: fix pid namespace bug, fix Li Zefan
2009-07-03 2:43 ` Serge E. Hallyn
2009-07-03 2:38 ` Li Zefan [this message]
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=4A4D6F38.8040602@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=bblum@google.com \
--cc=containers@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.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