From: ebiederm@xmission.com (Eric W. Biederman)
To: "Catalin Marinas" <catalin.marinas@gmail.com>
Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: Possible "struct pid" leak from tty_io.c
Date: Fri, 09 Mar 2007 09:13:15 -0700 [thread overview]
Message-ID: <m1y7m64cpw.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <b0943d9e0703090253r690e1f21qf8d7a1edfd08561b@mail.gmail.com> (Catalin Marinas's message of "Fri, 9 Mar 2007 10:53:01 +0000")
"Catalin Marinas" <catalin.marinas@gmail.com> writes:
> On 08/03/07, Eric W. Biederman <ebiederm@xmission.com> wrote:
>> "Catalin Marinas" <catalin.marinas@gmail.com> writes:
>
> I think it's only the pid_chain and rcu member that could be placed in
> a list and kmemleak scans the memory for these two offsets as well.
> I'll check those lists anyway but I doubt it's a more fundamental
> problem with how kmemleak handles struct pid as I should've probably
> got more reports.
Right. I was pointing out the possibilities but because we do
some tricky things. Mostly I was wondering about the hlist for
the list of tasks. Now if a task is on that list we should have
a struct pid_link pointing at our struct pid, so it shouldn't fool
kmemleak but I'm still a little curious if all of those hlist_heads are
NULL pointers.
>> In most any other layer we cache pids indefinitely and a situation
>> where we have a pointer to a struct pid with a ref count of 1 long
>> after the process goes away is expected.
>
> Yes, indeed, but what kmemleak reports is that the pid structure
> wasn't freed yet and there is no way to determine its pointer directly
> or via container_of on members (by scanning the memory), hence it is
> considered a leak.
Yes that sounds like a leak.
>> I don't understand your situation enough to guess what is going wrong
>> yet. Hopefully I have given you enough information to get started.
>
> Yes, many thanks. I'll dig further and let you know.
Thanks....
Eric
next prev parent reply other threads:[~2007-03-09 16:13 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-08 17:27 Catalin Marinas
2007-03-08 18:11 ` Eric W. Biederman
2007-03-09 10:53 ` Catalin Marinas
2007-03-09 16:13 ` Eric W. Biederman [this message]
2007-03-09 16:53 ` Catalin Marinas
2007-03-09 16:44 ` Catalin Marinas
2007-03-09 17:09 ` Eric W. Biederman
2007-03-12 15:07 ` Catalin Marinas
2007-03-12 16:12 ` Eric W. Biederman
2007-03-13 19:31 ` Eric W. Biederman
2007-03-14 9:59 ` Catalin Marinas
2007-03-14 14:40 ` Eric W. Biederman
2007-03-14 17:08 ` Catalin Marinas
2007-03-15 19:15 ` Eric W. Biederman
2007-03-16 22:01 ` Eric W. Biederman
2007-03-16 22:44 ` Catalin Marinas
2007-03-18 18:45 ` [PATCH] tty: Fix two reported pid leaks Eric W. Biederman
2007-03-18 18:52 ` [PATCH 0/4] tty: small fixes and cleanups Eric W. Biederman
2007-03-18 18:57 ` [PATCH 1/4] tty: Remove unnecessary export of proc_clear_tty Eric W. Biederman
2007-03-18 19:03 ` [PATCH 2/4] tty: Simplify calling of put_pid Eric W. Biederman
2007-03-18 19:08 ` [PATCH 3/4] tty: Introduce no_tty and use it in selinux Eric W. Biederman
2007-03-18 19:13 ` [PATCH 4/4] tty: In tiocsctty when we steal a tty hang it up Eric W. Biederman
2007-03-18 20:55 ` [PATCH 3/4] tty: Introduce no_tty and use it in selinux Alan Cox
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=m1y7m64cpw.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=catalin.marinas@gmail.com \
--cc=linux-kernel@vger.kernel.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®