summaryrefslogtreecommitdiff
path: root/fs/ceph/Kconfig
diff options
context:
space:
mode:
authorGoffredo Baroncelli <kreijack@inwind.it>2017-10-03 20:31:10 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-12 12:56:17 +0300
commit3d2f69689821725774998aa471fa4f398d5a22ec (patch)
treef0c56f3a3715c1cf3596d2ebb827b3c5168730c2 /fs/ceph/Kconfig
parent301dfc653cac5ee2a96744e2fd4473576bec95d2 (diff)
downloadlinux-3d2f69689821725774998aa471fa4f398d5a22ec.tar.xz
btrfs: avoid overflow when sector_t is 32 bit
commit 2d8ce70a08fe033c904115d59276ad86adeaa337 upstream. Jean-Denis Girard noticed commit c821e7f3 "pass bytes to btrfs_bio_alloc" (https://patchwork.kernel.org/patch/9763081/) introduces a regression on 32 bit machines. When CONFIG_LBDAF is _not_ defined (CONFIG_LBDAF == Support for large (2TB+) block devices and files) sector_t is 32 bit on 32bit machines. In the function submit_extent_page, 'sector' (which is sector_t type) is multiplied by 512 to convert it from sectors to bytes, leading to an overflow when the disk is bigger than 4GB (!). I added a cast to u64 to avoid overflow. Fixes: c821e7f3 ("btrfs: pass bytes to btrfs_bio_alloc") Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it> Tested-by: Jean-Denis Girard <jd.girard@sysnux.pf> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ceph/Kconfig')
0 files changed, 0 insertions, 0 deletions