summaryrefslogtreecommitdiff
path: root/rust/helpers/build_assert.c
diff options
context:
space:
mode:
authorNikola Z. Ivanov <zlatistiv@gmail.com>2025-11-05 13:09:43 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2025-12-04 02:00:03 +0000
commitf37981edcd06cd552c15c153c3202a6b2fa450e4 (patch)
tree083a87bd73d84f052ce2c1731fc50da411401831 /rust/helpers/build_assert.c
parent9b3c8336c633ca11778a1ff42b7c37b0563e6430 (diff)
f2fs: Add sanity checks before unlinking and loading inodes
Add check for inode->i_nlink == 1 for directories during unlink, as their value is decremented twice, which can trigger a warning in drop_nlink. In such case mark the filesystem as corrupted and return from the function call with the relevant failure return value. Additionally add the check for i_nlink == 1 in sanity_check_inode in order to detect on-disk corruption early. Reported-by: syzbot+c07d47c7bc68f47b9083@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=c07d47c7bc68f47b9083 Tested-by: syzbot+c07d47c7bc68f47b9083@syzkaller.appspotmail.com Signed-off-by: Nikola Z. Ivanov <zlatistiv@gmail.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'rust/helpers/build_assert.c')
0 files changed, 0 insertions, 0 deletions