mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michal Piotrowski" <michal.k.k.piotrowski@gmail.com>
To: "Shailabh Nagar" <nagar@watson.ibm.com>
Cc: "Catalin Marinas" <catalin.marinas@gmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Balbir Singh" <balbir@in.ibm.com>
Subject: Re: Possible memory leak in kernel/delayacct.c
Date: Wed, 23 Aug 2006 16:58:15 +0200	[thread overview]
Message-ID: <6bffcb0e0608230758sebc711fu9e41bff305966253@mail.gmail.com> (raw)
In-Reply-To: <44EB5794.9020205@watson.ibm.com>

Hi,

On 22/08/06, Shailabh Nagar <nagar@watson.ibm.com> wrote:
> Catalin Marinas wrote:
> > Hi Shailabh,
> >
> > Michal was running some kmemleak tests and there are about 20 orphan
> > pointers reported in delayacct.c. The allocation backtrace is:
> >
> > orphan pointer 0xf548fde0 (size 76):
> >  c0174674: <kmem_cache_zalloc>
> >  c01591ee: <__delayacct_tsk_init>
> >  c0127e06: <copy_process>
> >  c0128cd2: <do_fork>
> >  c0104d39: <sys_clone>
> >
> > I'm not sure whether the leak occurs but there might be a path where
> > task_struct is freed and the task->delays pointer is lost. Could you
> > please have a look at this? Thanks.
> >
>
> One possibility for the leak is a missing free for tsk->delays on a
> failed fork. Were the kmemleak tests causing fork failures to happen ?
> What was being run in userspace ? Since the tsk->delays get allocated
> from a slab, it should be easy enough to detect.
>
> Could you try the patch below ? Its also being used for an oops reported
> for delay accounting.

The problem seems to be fixed. Thanks.

$ ls /tmp/ml* | wc -l
20

$ cat /tmp/ml* | grep -c __delayacct_tsk_init
0

> Thanks,
> Shailabh

Regards,
Michal

-- 
Michal K. K. Piotrowski
LTG - Linux Testers Group
(http://www.stardust.webpages.pl/ltg/wiki/)

      reply	other threads:[~2006-08-23 14:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-19 10:58 Catalin Marinas
2006-08-22 19:14 ` Shailabh Nagar
2006-08-23 14:58   ` Michal Piotrowski [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=6bffcb0e0608230758sebc711fu9e41bff305966253@mail.gmail.com \
    --to=michal.k.k.piotrowski@gmail.com \
    --cc=balbir@in.ibm.com \
    --cc=catalin.marinas@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nagar@watson.ibm.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

all inboxes | Powered by JetHome®