kernel-ark/fs
Jeff Mahoney 9b7f375505 reiserfs: fix xattr root locking/refcount bug
The listxattr() and getxattr() operations are only protected by a read
lock.  As a result, if either of these operations run in parallel, a race
condition exists where the xattr_root will end up being cached twice, which
results in the leaking of a reference and a BUG() on umount.

This patch refactors get_xa_root(), __get_xa_root(), and create_xa_root(),
into one get_xa_root() function that takes the appropriate locking around
the entire critical section.

Reported, diagnosed and tested by Andrea Righi <a.righi@cineca.it>

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Cc: Andrea Righi <a.righi@cineca.it>
Cc: "Vladimir V. Saveliev" <vs@namesys.com>
Cc: Edward Shishkin <edward@namesys.com>
Cc: Alex Zarochentsev <zam@namesys.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-24 08:23:09 -07:00
..
9p v9fs: don't use primary fid when removing file 2007-04-24 08:23:08 -07:00
adfs
affs
afs
autofs
autofs4 [PATCH] autofs4: fix race in unhashed dentry code 2007-04-12 15:31:42 -07:00
befs
bfs
cifs Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 2007-03-22 19:47:09 -07:00
coda
configfs configfs: add missing mutex_unlock() 2007-03-14 14:37:21 -07:00
cramfs
debugfs
devpts
dlm [DLM] fs/dlm/user.c should #include "user.h" 2007-03-07 13:58:21 -05:00
ecryptfs [PATCH] eCryptfs: fix possible NULL ptr deref in ecryptfs_d_release() 2007-03-16 19:25:05 -07:00
efs
exportfs
ext2
ext3 [PATCH] revert "retries in ext3_prepare_write() violate ordering requirements" 2007-04-02 10:06:08 -07:00
ext4 [PATCH] revert "retries in ext4_prepare_write() violate ordering requirements" 2007-04-02 10:06:08 -07:00
fat
freevxfs
fuse [PATCH] fuse: validate rootmode mount option 2007-04-08 19:47:55 -07:00
gfs2 [GFS2] Fix bz 229873, alternate test: assertion "!ip->i_inode.i_mapping->nrpages" failed 2007-03-07 14:03:53 -05:00
hfs
hfsplus
hostfs [PATCH] uml: hostfs variable renaming 2007-03-29 08:22:25 -07:00
hpfs
hppfs
hugetlbfs
isofs
jbd
jbd2
jffs2 [JFFS2] print a message when marking bad block 2007-03-09 12:29:39 +00:00
jfs
lockd
minix
msdos
ncpfs ncpfs: make sure server connection survives a kill 2007-03-06 13:26:27 +01:00
nfs NFS: Fix race in nfs_set_page_dirty 2007-04-20 22:56:30 -07:00
nfs_common
nfsd [PATCH] knfsd: nfsd4: remove superfluous cancel_delayed_work() call 2007-03-27 09:05:14 -07:00
nls
ntfs
ocfs2 ocfs2_dlm: Check for migrateable lockres in dlm_empty_lockres() 2007-03-26 16:51:15 -07:00
openpromfs
partitions [PATCH] change misleading EFI partition support description 2007-03-16 19:25:06 -07:00
proc [PATCH] proc: fix linkage with CONFIG_SYSCTL=y, CONFIG_PROC_SYSCTL=n 2007-04-02 10:06:08 -07:00
qnx4
ramfs
reiserfs reiserfs: fix xattr root locking/refcount bug 2007-04-24 08:23:09 -07:00
romfs
smbfs [PATCH] smbfs: double free memory corruption 2007-03-16 19:25:05 -07:00
sysfs [PATCH] sysfs: reinstate exclusion between method calls and attribute unregistration 2007-03-15 15:29:26 -07:00
sysv
udf
ufs ufs proper handling of zero link case 2007-04-17 16:36:27 -07:00
vfat
xfs [PATCH] Make XFS workqueues nonfreezable 2007-03-22 19:39:06 -07:00
aio.c [PATCH] aio: remove bare user-triggerable error printk 2007-03-27 17:53:25 -07:00
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf_fdpic.c [PATCH] fix page leak during core dump 2007-04-02 10:06:08 -07:00
binfmt_elf.c [PATCH] fix page leak during core dump 2007-04-02 10:06:08 -07:00
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio.c
block_dev.c
buffer.c [PATCH] fs: nobh_truncate_page() fix 2007-03-06 09:30:25 -08:00
char_dev.c [PATCH] remove protection of LANANA-reserved majors 2007-04-04 21:12:47 -07:00
compat_ioctl.c [PATCH] wext: Add missing ioctls to 64<->32 conversion 2007-03-27 14:10:17 -04:00
compat.c [PATCH] Add epoll compat_ code to fs/compat.c 2007-03-08 07:38:22 -08:00
dcache.c
dcookies.c
direct-io.c
dnotify.c
dquot.c
drop_caches.c
eventpoll.c
exec.c exec.c: fix coredump to pipe problem and obscure "security hole" 2007-04-17 16:36:26 -07:00
fcntl.c
fifo.c
file_table.c
file.c
filesystems.c
fs-writeback.c
generic_acl.c
inode.c
inotify_user.c
inotify.c
internal.h
ioctl.c
ioprio.c
Kconfig
Kconfig.binfmt
libfs.c
locks.c
Makefile
mbcache.c
mpage.c
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
read_write.c
read_write.h
readdir.c
select.c
seq_file.c
splice.c [PATCH] splice: partial write fix 2007-03-29 14:26:42 +02:00
stack.c
stat.c
super.c
sync.c
utimes.c
xattr_acl.c
xattr.c