public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Anderson <andmike@us.ibm.com>
To: Heiko Carstens <Heiko.Carstens@de.ibm.com>
Cc: Adam Radford <aradford@3WARE.com>, linux-scsi@vger.kernel.org
Subject: Re: linux-2.6.0-test11 [BUG] -- scsi_add/remove_device - out of memory
Date: Tue, 13 Jan 2004 08:26:46 -0800	[thread overview]
Message-ID: <20040113162646.GA2550@beaverton.ibm.com> (raw)
In-Reply-To: <OF11CFD4DA.B5836830-ONC1256E1A.00322027-C1256E1A.00356646@de.ibm.com>

Heiko Carstens [Heiko.Carstens@de.ibm.com] wrote:
> Hi,
> 
> yes, now that I had some more time to look into it I found a leak.
> Actually the scsi mid layer creates a lot of sysfs attributes but
> doesn't remove a single one if a scsi device or a host gets removed.
> Since e.g. device_del (as it is called by scsi_remove_device) does
> not automatically remove all previously registered sysfs
> attributes, we end up with objects that have a reference count > 0
> and thus will never be released and eat up memory.
> 
> Heiko

Maybe something has changed, but the device_del calls kobject_del which
calls sysfs_remove_dir. sysfs_remove_dir removes all children enteries
created by sysfs_create_file. This should clean up the attributes.

-andmike
--
Michael Anderson
andmike@us.ibm.com


  reply	other threads:[~2004-01-13 16:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-13  9:44 linux-2.6.0-test11 [BUG] -- scsi_add/remove_device - out of memory Heiko Carstens
2004-01-13 16:26 ` Mike Anderson [this message]
2004-01-13 18:11   ` Mike Anderson
  -- strict thread matches above, loose matches on Subject: below --
2004-01-14 10:39 Heiko Carstens
     [not found] <OFE5F05878.12C1E995-ONC1256DF8.004D7413-C1256DF8.004E538F@de.ibm.com>
2003-12-10 15:09 ` Christoph Hellwig
2003-12-10 14:18 Heiko Carstens
2003-12-10  9:12 Heiko Carstens
2003-12-10 14:02 ` Christoph Hellwig

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=20040113162646.GA2550@beaverton.ibm.com \
    --to=andmike@us.ibm.com \
    --cc=Heiko.Carstens@de.ibm.com \
    --cc=aradford@3WARE.com \
    --cc=linux-scsi@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