public inbox for linux-kernel-mentees@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: "Nikola Z. Ivanov" <zlatistiv@gmail.com>,
	jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net
Cc: chao@kernel.org, linux-kernel@vger.kernel.org,
	skhan@linuxfoundation.org, david.hunter.linux@gmail.com,
	linux-kernel-mentees@lists.linuxfoundation.org,
	khalid@kernel.org, stable@kernel.org,
	syzbot+c07d47c7bc68f47b9083@syzkaller.appspotmail.com
Subject: Re: [PATCH v4 2/2] f2fs: Add sanity checks before unlinking and loading inodes
Date: Wed, 5 Nov 2025 19:14:48 +0800	[thread overview]
Message-ID: <96a9d740-5a96-4795-b69e-0cd0e165ad4a@kernel.org> (raw)
In-Reply-To: <c56dfb1f6a27cd04a91d41a0448a26118c7cdc38.1762339963.git.zlatistiv@gmail.com>

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@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>

Thanks,

  reply	other threads:[~2025-11-05 11:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-05 11:09 [PATCH v4 0/2] f2fs: Add sanity checks before unlinking and loading inodes Nikola Z. Ivanov
2025-11-05 11:09 ` [PATCH v4 1/2] f2fs: Rename f2fs_unlink exit label Nikola Z. Ivanov
2025-11-05 11:14   ` Chao Yu
2025-11-05 11:09 ` [PATCH v4 2/2] f2fs: Add sanity checks before unlinking and loading inodes Nikola Z. Ivanov
2025-11-05 11:14   ` Chao Yu [this message]
2025-11-11 22:50 ` [f2fs-dev] [PATCH v4 0/2] " patchwork-bot+f2fs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=96a9d740-5a96-4795-b69e-0cd0e165ad4a@kernel.org \
    --to=chao@kernel.org \
    --cc=david.hunter.linux@gmail.com \
    --cc=jaegeuk@kernel.org \
    --cc=khalid@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=stable@kernel.org \
    --cc=syzbot+c07d47c7bc68f47b9083@syzkaller.appspotmail.com \
    --cc=zlatistiv@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox