[OOPS] sysfs_hash_and_remove (was Re: What protection ....)

From: Maneesh Soni
Date: Wed Nov 23 2005 - 07:54:43 EST


On Wed, Nov 23, 2005 at 09:18:45AM +0100, Ingo Molnar wrote:
>
[..]
> on a related note - i've been carrying the patch below in -rt for 2
> months (i.e. Steven's kernel has it too), as a workaround against the
> crash described below.
>
[..]

> i'm occasionally getting the crash below on a PREEMPT_RT kernel. Might
> be a PREEMPT_RT bug, or might be some sysfs race only visible under
> PREEMPT_RT. Any ideas? The crash is at:
>
> (gdb) list *0xc01a2095
> 0xc01a2095 is in sysfs_hash_and_remove (fs/sysfs/inode.c:229).
> 224 }
> 225
> 226 void sysfs_hash_and_remove(struct dentry * dir, const char * name)
> 227 {
> 228 struct sysfs_dirent * sd;
> 229 struct sysfs_dirent * parent_sd = dir->d_fsdata;
> 230
> 231 if (dir->d_inode == NULL)
> 232 /* no inode means this hasn't been made visible yet */
> 233 return;
> (gdb)
>
Looks like here it is crashing due to bogus dentry pointer in the kobject
kobj->dentry. Could be some stale pointer?

Just got the mbox.. will go thru it more closely..

--
Maneesh Soni
Linux Technology Center,
IBM India Software Labs,
Bangalore, India
email: maneesh@xxxxxxxxxx
Phone: 91-80-25044990
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/