kernel-ark/fs
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
..
9p Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
adfs
affs Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
afs afs: needs sched.h 2007-05-31 07:58:14 -07:00
autofs
autofs4
befs
bfs
cifs [CIFS] CIFS should honour umask 2007-06-08 14:55:14 +00:00
coda Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
configfs Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
cramfs mm: make read_cache_page synchronous 2007-05-07 12:12:51 -07:00
debugfs
devpts
dlm
ecryptfs eCryptfs: delay writing 0's after llseek until write 2007-05-23 20:14:15 -07:00
efs
exportfs
ext2
ext3
ext4 When ext4_ext_insert_extent() fails to insert new blocks 2007-05-31 16:20:15 -04:00
fat
freevxfs
fuse fuse: delete inode on drop 2007-05-23 20:14:13 -07:00
gfs2 Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
hfs Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
hfsplus Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
hostfs
hpfs Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
hppfs
hugetlbfs
isofs
jbd
jbd2
jffs2 Merge git://git.infradead.org/mtd-2.6 2007-06-04 17:54:09 -07:00
jfs
lockd
minix Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
msdos
ncpfs Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
nfs NFS: Fix a refcount leakage in O_DIRECT 2007-05-30 16:26:01 -04:00
nfs_common
nfsd Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
nls
ntfs ntfs_init_locked_inode(): fix array indexing 2007-05-31 07:58:13 -07:00
ocfs2 ocfs2: Fix invalid assertion during write on 64k pages 2007-06-06 16:42:03 -07:00
openpromfs
partitions partitions/LDM: build fix 2007-05-21 21:38:17 -07:00
proc
qnx4
ramfs RAMFS NOMMU: missed POSIX UID/GID inode attribute checking 2007-06-07 17:11:13 -07:00
reiserfs Missing 'const' from reiserfs MIN_KEY declaration. 2007-05-23 20:14:13 -07:00
romfs
smbfs Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
sysfs sysfs: fix race condition around sd->s_dentry, take#2 2007-06-12 16:08:47 -07:00
sysv
udf parse errors in ifdefs 2007-06-01 08:18:28 -07:00
ufs
vfat
xfs [XFS] Write at EOF may not update filesize correctly. 2007-05-29 18:15:17 +10:00
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf_fdpic.c
binfmt_elf.c
binfmt_em86.c
binfmt_flat.c nommu: report correct errno in message 2007-06-08 17:23:32 -07:00
binfmt_misc.c Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
binfmt_script.c
binfmt_som.c
bio.c
block_dev.c
buffer.c Fix "fs: convert core functions to zero_user_page" 2007-05-21 09:15:32 -07:00
char_dev.c
compat_ioctl.c fix compat console unimap regression 2007-05-25 17:37:46 -07:00
compat.c optimize compat_core_sys_select() by a using stack space for small fd sets 2007-05-23 20:14:12 -07:00
dcache.c
dcookies.c
direct-io.c
dnotify.c
dquot.c circular locking dependency found in QUOTA OFF 2007-05-17 05:23:05 -07:00
drop_caches.c
eventfd.c eventfd use waitqueue lock ... 2007-05-18 13:09:34 -07:00
eventpoll.c
exec.c uselib: add missing MNT_NOEXEC check 2007-05-23 20:14:13 -07:00
fcntl.c
fifo.c Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
file_table.c
file.c
filesystems.c add filesystem subtype support 2007-05-08 11:15:01 -07:00
fs-writeback.c
generic_acl.c
inode.c
inotify_user.c
inotify.c
internal.h
ioctl.c vanishing ioctl handler debugging 2007-06-04 13:25:10 -07:00
ioprio.c
Kconfig
Kconfig.binfmt fs: Kill sh dependency for binfmt_flat. 2007-05-21 14:34:00 +09:00
libfs.c
locks.c
Makefile
mbcache.c
mpage.c consolidate generic_writepages and mpage_writepages 2007-05-11 08:29:35 -07:00
namei.c
namespace.c
nfsctl.c
no-block.c
open.c
pipe.c
pnode.c
pnode.h
posix_acl.c
quota_v1.c
quota_v2.c
quota.c circular locking dependency found in QUOTA OFF 2007-05-17 05:23:05 -07:00
read_write.c
read_write.h
readdir.c
select.c Style fix in fs/select.c 2007-05-09 07:10:02 +02:00
seq_file.c
signalfd.c signalfd: retrieve multiple signals with one read() call 2007-05-23 20:14:14 -07:00
splice.c splice: __generic_file_splice_read: fix read/truncate race 2007-06-08 08:34:11 +02:00
stack.c
stat.c
super.c
sync.c
timerfd.c timerfd use waitqueue lock ... 2007-05-18 13:09:34 -07:00
utimes.c
xattr_acl.c
xattr.c