summaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorTheodore Ts'o2009-01-18 00:41:37 +0100
committerTheodore Ts'o2009-01-18 00:41:37 +0100
commit06a279d636734da32bb62dd2f7b0ade666f65d7c (patch)
treee3fb1a899ea7a9d527ff0d8edf3ca23778321728 /fs/ext4/inode.c
parentext4: fix wrong use of do_div (diff)
downloadkernel-qcow2-linux-06a279d636734da32bb62dd2f7b0ade666f65d7c.tar.gz
kernel-qcow2-linux-06a279d636734da32bb62dd2f7b0ade666f65d7c.tar.xz
kernel-qcow2-linux-06a279d636734da32bb62dd2f7b0ade666f65d7c.zip
ext4: only use i_size_high for regular files
Directories are not allowed to be bigger than 2GB, so don't use i_size_high for anything other than regular files. E2fsck should complain about these inodes, but the simplest thing to do for the kernel is to only use i_size_high for regular files. This prevents an intentially corrupted filesystem from causing the kernel to burn a huge amount of CPU and issuing error messages such as: EXT4-fs warning (device loop0): ext4_block_to_path: block 135090028 > max Thanks to David Maciejak from Fortinet's FortiGuard Global Security Research Team for reporting this issue. http://bugzilla.kernel.org/show_bug.cgi?id=12375 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: stable@kernel.org
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index a6444cee0c7e..49484ba801c9 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -360,9 +360,9 @@ static int ext4_block_to_path(struct inode *inode,
final = ptrs;
} else {
ext4_warning(inode->i_sb, "ext4_block_to_path",
- "block %lu > max",
+ "block %lu > max in inode %lu",
i_block + direct_blocks +
- indirect_blocks + double_blocks);
+ indirect_blocks + double_blocks, inode->i_ino);
}
if (boundary)
*boundary = final - 1 - (i_block & (ptrs - 1));