All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@openvz.org>
To: Raphael S Carvalho <raphael.scarv@gmail.com>
Cc: Gao feng <gaofeng@cn.fujitsu.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Oleg Nesterov <oleg@redhat.com>,
	Serge Hallyn <serge.hallyn@canonical.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] kernel/pid_namespace.c: Fixing a lack of cleanup (Probable resources leak).
Date: Tue, 5 Mar 2013 09:51:26 +0400	[thread overview]
Message-ID: <20130305055126.GE11231@moon> (raw)
In-Reply-To: <CACz=WeetSxr5hb3BAKn7ks-yrMyCtgZ5HZjE+V14trmnoH+61g@mail.gmail.com>

On Tue, Mar 05, 2013 at 02:04:45AM -0300, Raphael S Carvalho wrote:
> >
> > Actually I noticed this problem and I think it is not a BUG.
> > Since the pid_cache is created for all pid namespace which have the same level.
> > Even this pid namespace is failed to create, the pid_cache will not be leaked, Other
> > pid namespace which has the same level will use the pid_cache and no need to
> > allocate it again. In other words, the pid_cache for every level pid namespace will
> > only be created once.
> >
> > I also think this patch add a bug,because there may be other pid namespace's pid_cachep
> > points to the same pid_cache which will be free at the by label out_free_cachep.
> >

Yup, drop this patch.

> 
> Yeah, I found the snippet of code which searches for the pcache with
> the same level.
>  46        list_for_each_entry(pcache, &pid_caches_lh, list)
>  47                if (pcache->nr_ids == nr_ids)
>  48                        goto out;

  reply	other threads:[~2013-03-05  5:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-05  3:26 [PATCH 1/1] kernel/pid_namespace.c: Fixing a lack of cleanup (Probable resources leak) Eric W. Biederman
2013-03-05  3:51 ` Gao feng
2013-03-05  5:04   ` Raphael S Carvalho
2013-03-05  5:51     ` Cyrill Gorcunov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-03-05  3:28 Raphael S.Carvalho
2013-03-05  6:32 ` 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=20130305055126.GE11231@moon \
    --to=gorcunov@openvz.org \
    --cc=akpm@linux-foundation.org \
    --cc=gaofeng@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=raphael.scarv@gmail.com \
    --cc=serge.hallyn@canonical.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 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.