From: Greg KH <greg@kroah.com>
To: "Adam J. Richter" <adam@yggdrasil.com>
Cc: chrisw@osdl.org, akpm@osdl.org, linux-kernel@vger.kernel.org,
maneesh@in.ibm.com, viro@parcelfarce.linux.theplanet.co.uk
Subject: Re: [PATCH 2.6.10-rc2-bk15] sysfs_dir_close memory leak
Date: Fri, 3 Dec 2004 10:56:31 -0800 [thread overview]
Message-ID: <20041203185631.GA2913@kroah.com> (raw)
In-Reply-To: <200412031105.iB3B5Kd05959@adam.yggdrasil.com>
On Fri, Dec 03, 2004 at 03:05:20AM -0800, Adam J. Richter wrote:
> Chris Wright wrote:
> >* Adam J. Richter (adam@yggdrasil.com) wrote:
> >> sysfs_dir_close did not free the "cursor" sysfs_dirent
> >> used for keeping track of position in the list of sysfs_dirent nodes.
> >> Consequently, doing a "find /sys" would leak a sysfs_dirent for
> >> each of the 1140 directories in my /sys tree, or about 36kB
> >> each time.
>
> >Yeah, I noticed this as well. Why the BUGON()?
>
> My thinking was that the preconditions in my tree for
> calling release_sysfs_dirent are dirent->s_dentry == NULL and
> list_empty(&dirent->s_sibling). The latter should be apparent
> from two lines above, but the former is less obvious, although
> it is also theoretically always true.
>
> I'm OK with deleting the BUG_ON(). It was not verifying
> anything passed in by an outside caller.
Thanks, I've deleted the BUG_ON() and will be sending the patch on to
Linus in a bit.
(oh, care to add a "Signed-off-by:" line to your patches?)
thanks,
greg k-h
next prev parent reply other threads:[~2004-12-03 18:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-03 2:50 [PATCH 2.6.10-rc2-bk15] sysfs_dir_close memory leak Adam J. Richter
2004-12-03 5:19 ` Chris Wright
2004-12-03 11:05 ` Adam J. Richter
2004-12-03 18:56 ` Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-12-04 2:39 Adam J. Richter
2004-12-04 7:35 ` Chris Wright
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=20041203185631.GA2913@kroah.com \
--to=greg@kroah.com \
--cc=adam@yggdrasil.com \
--cc=akpm@osdl.org \
--cc=chrisw@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maneesh@in.ibm.com \
--cc=viro@parcelfarce.linux.theplanet.co.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.