[f2fs-dev] [bug report] fs: f2fs: integer overflow in f2fs_truncate_inode_blocks()

2024-03-22 Thread Roman Smirnov
Hello. There is a possible bug in f2fs_truncate_inode_blocks(): if (err < 0 && err != -ENOENT) goto fail; ... offset[1] = 0; offset[0]++; nofs += err; If err = -ENOENT then nofs will sum with an error code, which is strange behaviour.

[f2fs-dev] [PATCH] f2fs: Cast expression type to unsigned long in __count_extent_cache()

2024-03-05 Thread Roman Smirnov
Cast expression type to unsigned long in __count_extent_cache() to prevent integer overflow. Found by Linux Verification Center (linuxtesting.org) with Svace. Signed-off-by: Roman Smirnov Reviewed-by: Sergey Shtylyov --- fs/f2fs/shrinker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion