From: Mike Anderson <andmike@us.ibm.com>
To: Rick Lindsley <ricklind@us.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [BUG] 2.5.47: sysfs hierarchy can begin to disintegrate
Date: Wed, 20 Nov 2002 09:51:27 -0800 [thread overview]
Message-ID: <20021120175127.GC1366@beaverton.ibm.com> (raw)
In-Reply-To: <200211200925.gAK9Pl002345@owlet.beaverton.ibm.com>
Rick Lindsley [ricklind@us.ibm.com] wrote:
> 2.5.47 (top of bk tree on 11/14, to be precise)
>
> /sys has a sysfs file system on it. I'd expect /sys/block to contain
> hd[abc], an assortment of ram disks, and perhaps some SCSI disks.
> However, these all appear under /sys instead of /sys/block. /sys/block
> exists but is empty.
>
> Interesting observation: the megaraid controller has some problem right
> now (suspected to be hardware) wherein its scsi disks appear at boot
> time but then cannot be accessed later and are subsequently detached.
> Since this could well be a little-used and little-tested path, my
> suspicion is that either the megaraid, scsi, or sysfs code has a bug when
> disks are detached. So far, I've not been able to find one, however, so
> I thought I'd report this in case others might know just where to peek.
> Could it be that removing entries from sysfs is done incorrectly in
> some cases?
Rick,
There are cleanup issues in sysfs previous reported by others.
The patch below previously sent to the list by patmans and
myself helps in repeated insmod / rmmod / shutdown testing of
scsi modules for us. We have not seen the null parent pointer
problem you are seeing which causes your objects to show up
under /sys/ (YMMV).
-andmike
--
Michael Anderson
andmike@us.ibm.com
bus.c | 4 +++-
core.c | 2 --
driver.c | 2 ++
3 files changed, 5 insertions(+), 3 deletions(-)
------
===== drivers/base/bus.c 1.22 vs edited =====
--- 1.22/drivers/base/bus.c Thu Oct 31 08:20:23 2002
+++ edited/drivers/base/bus.c Wed Nov 6 22:06:39 2002
@@ -209,8 +209,10 @@
attach(dev);
else
dev->driver = NULL;
- } else
+ } else {
attach(dev);
+ error = 0;
+ }
}
return error;
}
===== drivers/base/core.c 1.50 vs edited =====
--- 1.50/drivers/base/core.c Thu Oct 31 08:20:23 2002
+++ edited/drivers/base/core.c Wed Nov 6 13:07:47 2002
@@ -173,8 +173,6 @@
return -EINVAL;
device_initialize(dev);
- if (dev->parent)
- get_device(dev->parent);
error = device_add(dev);
if (error && dev->parent)
put_device(dev->parent);
===== drivers/base/driver.c 1.14 vs edited =====
--- 1.14/drivers/base/driver.c Wed Oct 30 16:35:48 2002
+++ edited/drivers/base/driver.c Wed Nov 6 21:41:48 2002
@@ -127,6 +127,8 @@
drv->present = 0;
spin_unlock(&device_lock);
pr_debug("driver %s:%s: unregistering\n",drv->bus->name,drv->name);
+ bus_remove_driver(drv);
+ kobject_unregister(&drv->kobj);
put_driver(drv);
}
next prev parent reply other threads:[~2002-11-20 17:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-20 9:25 Rick Lindsley
2002-11-20 17:51 ` Mike Anderson [this message]
2002-11-20 17:57 ` Patrick Mochel
2002-11-20 20:11 ` Patrick Mansfield
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=20021120175127.GC1366@beaverton.ibm.com \
--to=andmike@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ricklind@us.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®