alistair23-linux/fs
Jeff Moyer 65c24491b4 aio: lookup_ioctx can return the wrong value when looking up a bogus context
The libaio test harness turned up a problem whereby lookup_ioctx on a
bogus io context was returning the 1 valid io context from the list
(harness/cases/3.p).

Because of that, an extra put_iocontext was done, and when the process
exited, it hit a BUG_ON in the put_iocontext macro called from exit_aio
(since we expect a users count of 1 and instead get 0).

The problem was introduced by "aio: make the lookup_ioctx() lockless"
(commit abf137dd77).

Thanks to Zach for pointing out that hlist_for_each_entry_rcu will not
return with a NULL tpos at the end of the loop, even if the entry was
not found.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Acked-by: Zach Brown <zach.brown@oracle.com>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-19 15:57:18 -07:00
..
9p
adfs
affs
afs
autofs
autofs4
befs
bfs
btrfs Btrfs: Clear space_info full when adding new devices 2009-03-10 13:17:18 -04:00
cifs [CIFS] Fix multiuser mounts so server does not invalidate earlier security contexts 2009-02-21 03:37:10 +00:00
coda
configfs
cramfs
debugfs
devpts devpts: remove graffiti 2009-03-10 15:55:11 -07:00
dlm
ecryptfs eCryptfs: don't encrypt file key with filename key 2009-03-14 11:57:22 -07:00
efs
exportfs
ext2
ext3
ext4 ext4: fix bb_prealloc_list corruption due to wrong group locking 2009-03-16 23:25:40 -04:00
fat Fix _fat_bmap() locking 2009-03-11 12:04:18 -07:00
freevxfs
fuse
gfs2
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs
isofs
jbd
jbd2
jffs2 [JFFS2] fix mount crash caused by removed nodes 2009-02-21 11:09:29 +01:00
jfs
lockd NLM: Fix GRANT callback address comparison when IPv6 is enabled 2009-03-10 20:33:20 -04:00
minix
ncpfs
nfs NFS: Fix the fix to Bugzilla #11061, when IPv6 isn't defined... 2009-03-12 14:51:32 -04:00
nfs_common
nfsd NFSD: provide encode routine for OP_OPENATTR 2009-03-17 14:54:45 -04:00
nls
notify inotify: fix GFP_KERNEL related deadlock 2009-02-18 15:37:56 -08:00
ntfs
ocfs2 ocfs2: Use xs->bucket to set xattr value outside 2009-03-12 16:46:09 -07:00
omfs
openpromfs
partitions
proc Avoid 64-bit "switch()" statements on 32-bit architectures 2009-03-17 10:02:35 -07:00
qnx4
ramfs nommu: ramfs: don't leak pages when adding to page cache fails 2009-03-14 11:57:22 -07:00
reiserfs
romfs
smbfs
squashfs Squashfs: Valid filesystems are flagged as bad by the corrupted fs patch 2009-03-12 03:23:48 +00:00
sysfs
sysv
ubifs
udf
ufs
xfs xfs: only issues a cache flush on unmount if barriers are enabled 2009-03-06 17:35:12 -06:00
aio.c aio: lookup_ioctx can return the wrong value when looking up a bogus context 2009-03-19 15:57:18 -07:00
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio-integrity.c block: Add gfp_mask parameter to bio_integrity_clone() 2009-03-14 21:06:51 +01:00
bio.c block: fix memory leak in bio_clone() 2009-03-14 21:06:52 +01:00
block_dev.c
buffer.c Fix race in create_empty_buffers() vs __set_page_dirty_buffers() 2009-03-19 11:32:05 -07:00
char_dev.c
compat.c
compat_binfmt_elf.c
compat_ioctl.c Fix FREEZE/THAW compat_ioctl regression 2009-02-27 16:27:45 -08:00
dcache.c EXPORT_SYMBOL(d_obtain_alias) rather than EXPORT_SYMBOL_GPL 2009-02-27 16:26:20 -08:00
dcookies.c
direct-io.c
dquot.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c
fcntl.c
fifo.c
file.c
file_table.c
filesystems.c
fs-writeback.c fs: new inode i_state corruption fix 2009-03-12 16:20:24 -07:00
generic_acl.c
inode.c fs: new inode i_state corruption fix 2009-03-12 16:20:24 -07:00
internal.h
ioctl.c
ioprio.c
Kconfig
Kconfig.binfmt
libfs.c
locks.c
Makefile ext4: Reorder fs/Makefile so that ext2 root fs's are mounted using ext2 2009-02-28 09:50:01 -05:00
mbcache.c
mpage.c
namei.c
namespace.c Fix incomplete __mntput locking 2009-02-17 14:02:08 -08:00
nfsctl.c
no-block.c
open.c
pipe.c pipe_rdwr_fasync: fix the error handling to prevent the leak/crash 2009-03-12 16:20:23 -07:00
pnode.c
pnode.h
posix_acl.c
quota.c
quota_tree.c
quota_tree.h
quota_v1.c
quota_v2.c
quotaio_v1.h
quotaio_v2.h
read_write.c
read_write.h
readdir.c
select.c
seq_file.c seq_file: properly cope with pread 2009-02-18 15:37:53 -08:00
signalfd.c
splice.c
stack.c
stat.c
super.c vfs: add missing unlock in sget() 2009-03-12 16:20:23 -07:00
sync.c
timerfd.c timerfd: add flags check 2009-02-18 15:37:53 -08:00
utimes.c
xattr.c
xattr_acl.c