linux/fs/ext2
Jan Kara 7ba3ec5749 ext2: Fix fs corruption in ext2_get_xip_mem()
Commit 8e3dffc651 "Ext2: mark inode dirty after the function
dquot_free_block_nodirty is called" unveiled a bug in __ext2_get_block()
called from ext2_get_xip_mem(). That function called ext2_get_block()
mistakenly asking it to map 0 blocks while 1 was intended. Before the
above mentioned commit things worked out fine by luck but after that commit
we started returning that we allocated 0 blocks while we in fact
allocated 1 block and thus allocation was looping until all blocks in
the filesystem were exhausted.

Fix the problem by properly asking for one block and also add assertion
in ext2_get_blocks() to catch similar problems.

Reported-and-tested-by: Andiry Xu <andiry.xu@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2013-11-05 11:26:47 +01:00
..
Kconfig
Makefile
acl.c
acl.h
balloc.c
dir.c [readdir] simple local unixlike: switch to ->iterate() 2013-06-29 12:46:47 +04:00
ext2.h
file.c
ialloc.c ext2: Fix BUG_ON in evict() on inode deletion 2013-03-13 15:23:44 +01:00
inode.c ext2: Fix fs corruption in ext2_get_xip_mem() 2013-11-05 11:26:47 +01:00
ioctl.c
namei.c [O_TMPFILE] it's still short a few helpers, but infrastructure should be OK now... 2013-06-29 12:57:10 +04:00
super.c fs: Limit sys_mount to only request filesystem modules. 2013-03-03 19:36:31 -08:00
symlink.c
xattr.c
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c
xip.c ext2: Fix fs corruption in ext2_get_xip_mem() 2013-11-05 11:26:47 +01:00
xip.h