From: Arnd Bergmann <arnd@arndb.de>
To: Jesper Juhl <jesper.juhl@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, linux-kernel@vger.kernel.org
Subject: Re: Possible mem leak in copy_process()
Date: Thu, 17 Apr 2008 06:17:34 +0200 [thread overview]
Message-ID: <200804170617.36010.arnd@arndb.de> (raw)
In-Reply-To: <alpine.LNX.1.00.0804162336480.9837@dragon.funnycrock.com>
On Wednesday 16 April 2008, Jesper Juhl wrote:
>
> Perhaps it can never happen the way Coverity thinks it can. You are a much
> better judge of that than I, but it looks to me like it's at least
> possible in theory - in which case we have a potential leak every time we
> create a new process and that can't be good...
I think you're just looking at the common case here, which is correct:
The pid is allocated for task creation and stays around as long as the
task does. It gets freed when the last reference to it goes away,
usually in the put_pid() called from exit().
Arnd <><
next prev parent reply other threads:[~2008-04-17 4:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-16 21:45 Possible mem leak in copy_process() Jesper Juhl
2008-04-17 4:17 ` Arnd Bergmann [this message]
2008-04-17 11:57 ` Oleg Nesterov
2008-04-17 13:02 ` Ingo Molnar
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=200804170617.36010.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=jesper.juhl@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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