From: Ingo Molnar <mingo@elte.hu>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Jesper Juhl <jesper.juhl@gmail.com>,
linux-kernel@vger.kernel.org, Pavel Emelyanov <xemul@openvz.org>,
"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: Possible mem leak in copy_process()
Date: Thu, 17 Apr 2008 15:02:53 +0200 [thread overview]
Message-ID: <20080417130252.GB6640@elte.hu> (raw)
In-Reply-To: <20080417115718.GC103@tv-sign.ru>
* Oleg Nesterov <oleg@tv-sign.ru> wrote:
> > 1331 if (likely(p->pid)) {
> > 1351 }
> > Event leaked_storage: Returned without freeing storage "pid" Also
> > see events: [alloc_fn][var_assign][pass_arg]
>
> this looks like a false alarm.
>
> p->pid == pid->numbers[0].nr. If "struct pid *pid" was allocated, its
> .nr can't be 0.
>
> IOW, !p->pid means that pid == init_struct_pid, it wasn't allocated
> but was passed from the caller.
should we perhaps codify this rule via adding something like this to the
else branch:
WARN_ON_ONCE(task_pid(p) != &init_struct_pid);
?
Ingo
next prev parent reply other threads:[~2008-04-17 13:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-16 21:45 Jesper Juhl
2008-04-17 4:17 ` Arnd Bergmann
2008-04-17 11:57 ` Oleg Nesterov
2008-04-17 13:02 ` Ingo Molnar [this message]
2008-04-17 14:02 ` fork_idle && pid problems ? (was: Possible mem leak in copy_process()) Oleg Nesterov
2008-04-17 15:50 ` fork_idle && pid problems ? Pavel Emelyanov
2008-04-17 15:36 ` Oleg Nesterov
2008-04-17 16:40 ` Pavel Emelyanov
2008-04-17 16:05 ` Oleg Nesterov
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=20080417130252.GB6640@elte.hu \
--to=mingo@elte.hu \
--cc=ebiederm@xmission.com \
--cc=jesper.juhl@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@tv-sign.ru \
--cc=xemul@openvz.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 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®