u-boot/fs/btrfs
Qu Wenruo 3b72612ad1 fs: btrfs: volumes: prevent overflow for multiplying
In __btrfs_map_block() we do a int * int and assign it to u64.
This is not safe as the result (int * int) is still evaluated as (int)
thus it can overflow.

Convert one of the multiplier to u64 to prevent such problem.

In real world, this should not cause problem as we have device number
limit thus it won't go beyond 4G for a single stripe.

But it's harder to teach coverity about all these hidden limits, so just
fix the possible overflow.

Reported-by: Coverity CID 312957
Reported-by: Coverity CID 312948
Signed-off-by: Qu Wenruo <wqu@suse.com>
2021-01-20 14:01:08 -05:00
..
common fs: btrfs: Crossport rbtree-utils from btrfs-progs 2020-09-07 20:57:27 -04:00
crypto fs: btrfs: Add more checksum algorithms 2020-09-07 20:57:27 -04:00
kernel-shared fs: btrfs: Sync btrfs_btree.h from kernel 2020-09-07 20:57:27 -04:00
btrfs.c fs: btrfs: initialize @ret to 0 to prevent uninitialized return value 2020-11-19 09:45:49 -05:00
btrfs.h fs: btrfs: Cleanup the old implementation 2020-09-07 21:00:36 -04:00
compat.h fs: btrfs: Introduce function to resolve path in one subvolume 2020-09-07 21:00:36 -04:00
compression.c fs: btrfs: Cleanup the old implementation 2020-09-07 21:00:36 -04:00
conv-funcs.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ctree.c fs: btrfs: Cleanup the old implementation 2020-09-07 21:00:36 -04:00
ctree.h fs: btrfs: Cleanup the old implementation 2020-09-07 21:00:36 -04:00
dev.c common: Drop part.h from common header 2020-05-18 17:33:33 -04:00
dir-item.c fs: btrfs: Cleanup the old implementation 2020-09-07 21:00:36 -04:00
disk-io.c fs: btrfs: Cleanup the old implementation 2020-09-07 21:00:36 -04:00
disk-io.h fs: btrfs: Cleanup the old implementation 2020-09-07 21:00:36 -04:00
extent-cache.c fs: btrfs: Crossport extent-cache.[ch] from btrfs-progs 2020-09-07 20:57:27 -04:00
extent-cache.h fs: btrfs: Crossport extent-cache.[ch] from btrfs-progs 2020-09-07 20:57:27 -04:00
extent-io.c fs: btrfs: Cleanup the old implementation 2020-09-07 21:00:36 -04:00
extent-io.h fs: btrfs: Crossport extent-io.[ch] from btrfs-progs 2020-09-07 20:57:27 -04:00
inode.c fs: btrfs: inode: handle uninitialized type before returning it 2020-11-19 09:45:49 -05:00
Kconfig fs: btrfs: add zstd decompression support 2019-05-05 08:48:50 -04:00
Makefile fs: btrfs: Cleanup the old implementation 2020-09-07 21:00:36 -04:00
root-tree.c fs: btrfs: Crossport open_ctree_fs_info() from btrfs-progs 2020-09-07 20:57:27 -04:00
subvolume.c fs: btrfs: Cleanup the old implementation 2020-09-07 21:00:36 -04:00
volumes.c fs: btrfs: volumes: prevent overflow for multiplying 2021-01-20 14:01:08 -05:00
volumes.h fs: btrfs: Crossport btrfs_read_sys_array() and btrfs_read_chunk_tree() 2020-09-07 20:57:27 -04:00