mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Adam J. Richter" <adam@yggdrasil.com>
To: nanhai.zou@intel.com
Cc: greg@kroah.com, linux-kernel@vger.kernel.org, maneesh@in.ibm.com
Subject: Re: [Patch]Memory leak in sysfs
Date: Fri, 10 Dec 2004 23:11:46 +0800	[thread overview]
Message-ID: <200412101511.iBAFBkR02052@freya.yggdrasil.com> (raw)

Zou, Nanhai wrote:
>Some stress testes show there is a memory leak in the latest kernel.
>I found the memory leak is in sysfs.
>Here is a patch against 2.6.10-rc2-mm4 to fix that.
>
>Signed-off-by: Zou Nan hai <Nanhai.Zou@intel.com>
>
>["sysfs-memleak-fix.patch" (application/octet-stream)]
>
>diff -Nraup a/fs/sysfs/dir.c b/fs/sysfs/dir.c
>--- a/fs/sysfs/dir.c    2004-12-06 13:04:56.000000000 +0800
>+++ b/fs/sysfs/dir.c    2004-12-07 16:49:36.000000000 +0800
>@@ -349,6 +349,7 @@ static int sysfs_dir_close(struct inode 
> 
>        down(&dentry->d_inode->i_sem);
>        list_del_init(&cursor->s_sibling);
>+       sysfs_put(cursor);
>        up(&dentry->d_inode->i_sem);
> 
>        return 0;


	This is will be fixed when the patch that I posted
at http://marc.theaimsgroup.com/?l=linux-kernel&m=110204311025022&w=2
is applied (that patch calls release_sysfs_dirent, since there
is no need for the reference counting of sysfs_put in this case).
I believe that Greg had already indicated he was going to forward
that patch to Linus (without the BUG_ON statement in my patch, which
is fine with me).

                    __     ______________ 
Adam J. Richter        \ /
adam@yggdrasil.com      | g g d r a s i l

             reply	other threads:[~2004-12-10 15:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-10 15:11 Adam J. Richter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-12-10 15:15 Adam J. Richter
2004-12-10  2:21 Zou, Nanhai
2004-12-10  3:53 ` Greg KH
2003-08-29 11:46 [PATCH] memory " Thomas XB Spatzier
2003-08-27 13:33 Thomas Spatzier
2003-08-28 23:39 ` Patrick Mochel
2003-08-29  0:26 ` Patrick Mochel

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=200412101511.iBAFBkR02052@freya.yggdrasil.com \
    --to=adam@yggdrasil.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maneesh@in.ibm.com \
    --cc=nanhai.zou@intel.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®