Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

__generic_block_fiemap(): fix for files bigger than 4GB

Because of an integer overflow on start_blk, various kind of wrong results
would be returned by the generic_block_fiemap() handler, such as no
extents when there is a 4GB+ hole at the beginning of the file, or wrong
fe_logical when an extent starts after the first 4GB.

Signed-off-by: Mike Hommey <mh@glandium.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Eric Sandeen <sandeen@sgi.com>
Cc: Josef Bacik <jbacik@redhat.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Mike Hommey and committed by
Linus Torvalds
e04b5ef8 276b282e

+1 -1
+1 -1
fs/ioctl.c
··· 254 254 u64 len, get_block_t *get_block) 255 255 { 256 256 struct buffer_head tmp; 257 - unsigned int start_blk; 257 + unsigned long long start_blk; 258 258 long long length = 0, map_len = 0; 259 259 u64 logical = 0, phys = 0, size = 0; 260 260 u32 flags = FIEMAP_EXTENT_MERGED;