The condition check doesn't make much sense as it basically always succeeds. This causes NULL dereferencing on certain cases. It seems that parentheses are put in the wrong place. Fix it. DON'T APPLY JUST YET --- Maneesh, is this correct? fs/sysfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: work/fs/sysfs/inode.c =================================================================== --- work.orig/fs/sysfs/inode.c +++ work/fs/sysfs/inode.c @@ -250,7 +250,7 @@ void sysfs_drop_dentry(struct sysfs_dire if (dentry) { spin_lock(&dcache_lock); spin_lock(&dentry->d_lock); - if (!(d_unhashed(dentry) && dentry->d_inode)) { + if (!d_unhashed(dentry) && dentry->d_inode) { inode = dentry->d_inode; spin_lock(&inode->i_lock); __iget(inode); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH 1/2] sysfs: fix condition check in sysfs_drop_dentry()
- From: Maneesh Soni <[email protected]>
- Re: [PATCH 1/2] sysfs: fix condition check in sysfs_drop_dentry()
- References:
- Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
- From: Clemens Schwaighofer <[email protected]>
- Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
- From: Andrew Morton <[email protected]>
- Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
- From: Tejun Heo <[email protected]>
- Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
- From: Andrew Morton <[email protected]>
- Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
- From: Tejun Heo <[email protected]>
- Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
- From: Andrew Morton <[email protected]>
- [PATCH -stable] sysfs: disable reclamation by default
- From: Tejun Heo <[email protected]>
- Re: [PATCH -stable] sysfs: disable reclamation by default
- From: Greg KH <[email protected]>
- Re: [PATCH -stable] sysfs: disable reclamation by default
- From: Maneesh Soni <[email protected]>
- Re: [PATCH -stable] sysfs: disable reclamation by default
- From: Tejun Heo <[email protected]>
- Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
- Prev by Date: RSS controller v2 Test results (lmbench )
- Next by Date: Re: [PATCH 0/5] make slab gfp fair
- Previous by thread: Re: [PATCH -stable] sysfs: disable reclamation by default
- Next by thread: Re: [PATCH 1/2] sysfs: fix condition check in sysfs_drop_dentry()
- Index(es):