[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <96a9d740-5a96-4795-b69e-0cd0e165ad4a@kernel.org>
Date: Wed, 5 Nov 2025 19:14:48 +0800
From: Chao Yu <chao@...nel.org>
To: "Nikola Z. Ivanov" <zlatistiv@...il.com>, jaegeuk@...nel.org,
linux-f2fs-devel@...ts.sourceforge.net
Cc: chao@...nel.org, linux-kernel@...r.kernel.org, skhan@...uxfoundation.org,
david.hunter.linux@...il.com,
linux-kernel-mentees@...ts.linuxfoundation.org, khalid@...nel.org,
stable@...nel.org, syzbot+c07d47c7bc68f47b9083@...kaller.appspotmail.com
Subject: Re: [PATCH v4 2/2] f2fs: Add sanity checks before unlinking and
loading inodes
On 11/5/25 19:09, Nikola Z. Ivanov wrote:
> 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@...kaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=c07d47c7bc68f47b9083
> Tested-by: syzbot+c07d47c7bc68f47b9083@...kaller.appspotmail.com
> Signed-off-by: Nikola Z. Ivanov <zlatistiv@...il.com>
Reviewed-by: Chao Yu <chao@...nel.org>
Thanks,
Powered by blists - more mailing lists