aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorBaokun Li <libaokun1@huawei.com>2023-07-24 20:10:59 +0800
committerTheodore Ts'o <tytso@mit.edu>2023-07-29 00:02:30 -0400
commitbedc5d34632c21b5adb8ca7143d4c1f794507e4c (patch)
tree509df443f936c528b3735379b73c0e94e299f761 /tools/perf/scripts/python/export-to-postgresql.py
parentext4: fix BUG in ext4_mb_new_inode_pa() due to overflow (diff)
downloadlinux-rng-bedc5d34632c21b5adb8ca7143d4c1f794507e4c.tar.xz
linux-rng-bedc5d34632c21b5adb8ca7143d4c1f794507e4c.zip
ext4: avoid overlapping preallocations due to overflow
Let's say we want to allocate 2 blocks starting from 4294966386, after predicting the file size, start is aligned to 4294965248, len is changed to 2048, then end = start + size = 0x100000000. Since end is of type ext4_lblk_t, i.e. uint, end is truncated to 0. This causes (pa->pa_lstart >= end) to always hold when checking if the current extent to be allocated crosses already preallocated blocks, so the resulting ac_g_ex may cross already preallocated blocks. Hence we convert the end type to loff_t and use pa_logical_end() to avoid overflow. Signed-off-by: Baokun Li <libaokun1@huawei.com> Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Link: https://lore.kernel.org/r/20230724121059.11834-4-libaokun1@huawei.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions