diff options
author | Baokun Li <libaokun1@huawei.com> | 2023-10-23 09:30:54 +0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2023-12-14 10:54:46 -0500 |
commit | 658a52344fb139f9531e7543a6e0015b630feb38 (patch) | |
tree | d0c5031c383c9ecc2260e54da7954208bf468887 /tools/perf/scripts/python/mem-phys-addr.py | |
parent | 6c02757c936063f0631b4e43fe156f8c8f1f351f (diff) |
ext4: unify the type of flexbg_size to unsigned int
The maximum value of flexbg_size is 2^31, but the maximum value of int
is (2^31 - 1), so overflow may occur when the type of flexbg_size is
declared as int.
For example, when uninit_mask is initialized in ext4_alloc_group_tables(),
if flexbg_size == 2^31, the initialized uninit_mask is incorrect, and this
may causes set_flexbg_block_bitmap() to trigger a BUG_ON().
Therefore, the flexbg_size type is declared as unsigned int to avoid
overflow and memory waste.
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20231023013057.2117948-2-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions