* [PATCH] fix sysfs oops [1/4]
@ 2003-12-23 0:24 Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2003-12-23 0:24 UTC (permalink / raw)
To: linux-hotplug
This fixes an oops when a kobject is unregistered before it's child is.
The usb-serial devices show this bug very easily (yank out a device
while its port is opened...)
Patch was originally written by Mike Gorse <mgorse@mgorse.dhs.org>
diff -Nru a/fs/sysfs/dir.c b/fs/sysfs/dir.c
--- a/fs/sysfs/dir.c Mon Dec 22 16:02:07 2003
+++ b/fs/sysfs/dir.c Mon Dec 22 16:02:07 2003
@@ -83,7 +83,8 @@
struct dentry * parent = dget(d->d_parent);
down(&parent->d_inode->i_sem);
d_delete(d);
- simple_rmdir(parent->d_inode,d);
+ if (d->d_inode)
+ simple_rmdir(parent->d_inode,d);
pr_debug(" o %s removing done (%d)\n",d->d_name.name,
atomic_read(&d->d_count));
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] fix sysfs oops [1/4]
2003-12-23 0:21 [PATCH] some sysfs patches for 2.6.0 [0/4] Greg KH
@ 2003-12-23 0:24 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2003-12-23 0:24 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, linux-hotplug-devel
This fixes an oops when a kobject is unregistered before it's child is.
The usb-serial devices show this bug very easily (yank out a device
while its port is opened...)
Patch was originally written by Mike Gorse <mgorse@mgorse.dhs.org>
diff -Nru a/fs/sysfs/dir.c b/fs/sysfs/dir.c
--- a/fs/sysfs/dir.c Mon Dec 22 16:02:07 2003
+++ b/fs/sysfs/dir.c Mon Dec 22 16:02:07 2003
@@ -83,7 +83,8 @@
struct dentry * parent = dget(d->d_parent);
down(&parent->d_inode->i_sem);
d_delete(d);
- simple_rmdir(parent->d_inode,d);
+ if (d->d_inode)
+ simple_rmdir(parent->d_inode,d);
pr_debug(" o %s removing done (%d)\n",d->d_name.name,
atomic_read(&d->d_count));
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-12-23 0:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-23 0:24 [PATCH] fix sysfs oops [1/4] Greg KH
-- strict thread matches above, loose matches on Subject: below --
2003-12-23 0:21 [PATCH] some sysfs patches for 2.6.0 [0/4] Greg KH
2003-12-23 0:24 ` [PATCH] fix sysfs oops [1/4] Greg KH
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.