kernel-fxtec-pro1x/fs/sysfs
Tejun Heo dd14cbc994 sysfs: fix race condition around sd->s_dentry, take#2
Allowing attribute and symlink dentries to be reclaimed means
sd->s_dentry can change dynamically.  However, updates to the field
are unsynchronized leading to race conditions.  This patch adds
sysfs_lock and use it to synchronize updates to sd->s_dentry.

Due to the locking around ->d_iput, the check in sysfs_drop_dentry()
is complex.  sysfs_lock only protect sd->s_dentry pointer itself.  The
validity of the dentry is protected by dcache_lock, so whether dentry
is alive or not can only be tested while holding both locks.

This is minimal backport of sysfs_drop_dentry() rewrite in devel
branch.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-06-12 16:08:47 -07:00
..
bin.c sysfs: printk format warning 2007-05-02 18:57:59 -07:00
dir.c sysfs: fix race condition around sd->s_dentry, take#2 2007-06-12 16:08:47 -07:00
file.c use simple_read_from_buffer() in fs/ 2007-05-09 12:30:49 -07:00
group.c security: prevent permission checking of file removal via sysfs_remove_group() 2007-04-27 10:57:33 -07:00
inode.c sysfs: fix race condition around sd->s_dentry, take#2 2007-06-12 16:08:47 -07:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mount.c sysfs: store sysfs inode nrs in s_ino to avoid readdir oopses 2007-06-12 16:08:46 -07:00
symlink.c [PATCH] mark struct inode_operations const 3 2007-02-12 09:48:46 -08:00
sysfs.h sysfs: fix race condition around sd->s_dentry, take#2 2007-06-12 16:08:47 -07:00