linux/fs/ext3
Jan Kara ad95c5e9bc ext3: Fix oops in ext3_try_to_allocate_with_rsv()
Block allocation is called from two places: ext3_get_blocks_handle() and
ext3_xattr_block_set(). These two callers are not necessarily synchronized
because xattr code holds only xattr_sem and i_mutex, and
ext3_get_blocks_handle() may hold only truncate_mutex when called from
writepage() path. Block reservation code does not expect two concurrent
allocations to happen to the same inode and thus assertions can be triggered
or reservation structure corruption can occur.

Fix the problem by taking truncate_mutex in xattr code to serialize
allocations.

CC: Sage Weil <sage@newdream.net>
CC: stable@kernel.org
Reported-by: Fyodor Ustinov <ufm@ufm.su>
Signed-off-by: Jan Kara <jack@suse.cz>
2011-06-25 17:29:52 +02:00
..
acl.c userns: rename is_owner_or_cap to inode_owner_or_capable 2011-03-23 19:47:13 -07:00
acl.h fs: provide rcu-walk aware permission i_ops 2011-01-07 17:50:29 +11:00
balloc.c ext3: Add fixed tracepoints 2011-06-25 17:29:51 +02:00
bitmap.c fs: mark nibblemap const 2007-10-17 08:42:47 -07:00
dir.c ext3: speed up file creates by optimizing rec_len functions 2011-01-10 19:04:07 +01:00
ext3_jbd.c ext3: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:45 -07:00
file.c ext3: Convert ext3 to new truncate calling convention 2011-06-25 17:29:51 +02:00
fsync.c ext3: Add fixed tracepoints 2011-06-25 17:29:51 +02:00
hash.c ext3: Add support for non-native signed/unsigned htree hash algorithms 2008-10-28 13:21:55 -04:00
ialloc.c ext3: Add fixed tracepoints 2011-06-25 17:29:51 +02:00
inode.c ext3: Convert ext3 to new truncate calling convention 2011-06-25 17:29:51 +02:00
ioctl.c userns: rename is_owner_or_cap to inode_owner_or_capable 2011-03-23 19:47:13 -07:00
Kconfig ext3: default to ordered mode 2010-07-23 12:50:55 +02:00
Makefile
namei.c ext3: Add fixed tracepoints 2011-06-25 17:29:51 +02:00
namei.h
resize.c Fix common misspellings 2011-03-31 11:26:23 -03:00
super.c ext3: Add fixed tracepoints 2011-06-25 17:29:51 +02:00
symlink.c ext3: symlink must be handled via filesystem specific operation 2010-04-12 21:11:39 +02:00
xattr_security.c fs/vfs/security: pass last path component to LSM on inode creation 2011-02-01 11:12:29 -05:00
xattr_trusted.c ext3: constify xattr handlers 2010-05-21 18:31:19 -04:00
xattr_user.c ext3: constify xattr handlers 2010-05-21 18:31:19 -04:00
xattr.c ext3: Fix oops in ext3_try_to_allocate_with_rsv() 2011-06-25 17:29:52 +02:00
xattr.h fs/vfs/security: pass last path component to LSM on inode creation 2011-02-01 11:12:29 -05:00