[2.6.6-mm3] sysfs backing store ver 0.6

From: Maneesh Soni
Date: Mon May 17 2004 - 07:09:58 EST


Hello Andrew,

Please find the following patch set for sysfs backing store for 2.6.6-mm3
kernel. I have fixed the rejects and there are also a few code changes.

The main change is related to providing protection against vulnerability of
parent dentry going off before the sysfs file being deleted. If you have
seen there was a oops message reported with 2.6.6-mm1 in which parent
dentry's ref count is zero when it was trying to remove a sysfs link.

http://marc.theaimsgroup.com/?l=linux-kernel&m=108422899203505&w=2

The changes I did are in fs/sysfs/inode.c:sysfs_hash_and_remove() and
sysfs_remove_dir(), where it is now checking s_dentry field of the
corresponding sysfs_dirent to get the dentry (if valid) of the file
being deleted. Apart from being safe against parent dentry going off
before the child, this change also avoids allocating the dentry in the
removal path by not doing the lookup.

Please include the following patches in the next -mm and also note that they
all depend on the fix-sysfs-symlinks.patch, I just mailed.
http://marc.theaimsgroup.com/?l=linux-kernel&m=108479506507825&w=2

Thanks
Maneesh

--
Maneesh Soni
Linux Technology Center,
IBM Software Lab, Bangalore, India
email: maneesh@xxxxxxxxxx
Phone: 91-80-25044999 Fax: 91-80-25268553
T/L : 9243696
-
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/