aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/libxed.py
diff options
context:
space:
mode:
authorChao Yu <[email protected]>2024-03-22 22:59:55 +0800
committerJaegeuk Kim <[email protected]>2024-03-26 16:53:00 +0000
commit92c556ed6318e13c16746495a8d4513129eb9b0f (patch)
tree33ad2e47c97f0d51477f2acc7bd9669bbbb742df /tools/perf/scripts/python/libxed.py
parent3127f1010c9b27d925e83081d413ea7fc361abb0 (diff)
f2fs: fix to detect inconsistent nat entry during truncation
As Roman Smirnov reported as below: " 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. Also if nofs < ENOENT this will cause an overflow. err will be equal to -ENOENT with the following call stack: truncate_nodes() f2fs_get_node_page() __get_node_page() read_node_page() " If nat is corrupted, truncate_nodes() may return -ENOENT, and f2fs_truncate_inode_blocks() doesn't handle such error correctly, fix it. Reported-by: Roman Smirnov <[email protected]> Closes: https://lore.kernel.org/linux-f2fs-devel/[email protected] Signed-off-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions