summaryrefslogtreecommitdiff
path: root/sound/isa/ad1848
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2012-03-02 16:09:05 +0400
committerJan Kara <jack@suse.cz>2012-03-02 20:47:40 +0400
commite703c206135acb458adb705ec44bcc5d2615b37d (patch)
treeac569403ce4e4c1da33307e862c009810c56c492 /sound/isa/ad1848
parenta0391a3ae91d301c0e59368531a4de5f0b122bcf (diff)
downloadlinux-e703c206135acb458adb705ec44bcc5d2615b37d.tar.xz
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>
Diffstat (limited to 'sound/isa/ad1848')
0 files changed, 0 insertions, 0 deletions