linux/fs/ext3
Lukas Czerner e703c20613 ext3: fix start and len arguments handling in ext3_trim_fs()
The overflow might happen when passing blocknr into
ext3_get_group_no_and_offset(), because it expects type ext3_fsblk_t
which might be smaller than uint64_t. This will most likely happen when
calling FITRIM with the default argument len = ULLONG_MAX.

Fix this by using "end" variable instead of "start+len" as it is easier
to get right and specifically check that the end is not beyond the end
of the file system, so we are sure that the result of
get_group_no_and_offset() will not overflow. Otherwise truncate it to
the size of the file system.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Jan Kara <jack@suse.cz>
2012-03-02 17:47:40 +01:00
..
acl.c switch posix_acl_equiv_mode() to umode_t * 2011-08-01 02:10:06 -04:00
acl.h fs: take the ACL checks to common code 2011-07-25 14:30:23 -04:00
balloc.c ext3: fix start and len arguments handling in ext3_trim_fs() 2012-03-02 17:47:40 +01: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 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6 2011-07-26 11:34:40 -07:00
fsync.c ext3: Remove i_mutex from ext3_sync_file() 2011-08-17 11:41:20 +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 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs 2012-01-09 12:51:21 -08:00
inode.c ext3: Update ctime in ext3_splice_branch() only when needed 2012-02-29 21:53:46 +01:00
ioctl.c Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs 2012-01-09 12:51:21 -08:00
Kconfig ext3: default to ordered mode 2010-07-23 12:50:55 +02:00
Makefile
namei.c Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs 2012-01-09 12:51:21 -08:00
namei.h
resize.c Fix common misspellings 2011-03-31 11:26:23 -03:00
super.c Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs 2012-01-09 12:51:21 -08:00
symlink.c ext3: symlink must be handled via filesystem specific operation 2010-04-12 21:11:39 +02:00
xattr_security.c ext2/3/4: delete unneeded includes of module.h 2012-01-09 13:52:10 +01:00
xattr_trusted.c ext2/3/4: delete unneeded includes of module.h 2012-01-09 13:52:10 +01:00
xattr_user.c ext2/3/4: delete unneeded includes of module.h 2012-01-09 13:52:10 +01: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