From: Junjie Cao <junjie.cao@linux.dev>
To: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: Deepanshu Kartikey <kartikey406@gmail.com>,
Viacheslav Dubeyko <slava@dubeyko.com>,
Andrew Morton <akpm@linux-foundation.org>,
Koji Sato <sato.koji@lab.ntt.co.jp>,
linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org,
syzbot+98a040252119df0506f8@syzkaller.appspotmail.com,
Junjie Cao <junjie.cao@linux.dev>
Subject: Re: [PATCH] nilfs2: fix missing continue after -ENOENT in nilfs_ioctl_mark_blocks_dirty()
Date: Wed, 25 Mar 2026 16:35:20 +0800 [thread overview]
Message-ID: <20260325083520.501618-1-junjie.cao@linux.dev> (raw)
In-Reply-To: <CAKFNMo=Z2wsL5za0VUeYh23nodPusUCC9WasSeR5BHc6tEBu1A@mail.gmail.com>
Hi Ryusuke,
On Sat, 21 Mar 2026 at 02:32:05 +0900, Ryusuke Konishi wrote:
> Since this implementation interacts with userland GC, I will check
> whether this is a simple missing 'continue' statement or if it was
> intentional.
Both downstream paths have asserted on (ret == -ENOENT) since the
original commit 7942b919f732 -- initially as BUG_ON, later softened
to WARN_ON by 1f5abe7e7dbc. If -ENOENT were meant to reach those
paths, asserting on it would be contradictory.
The original code appears to rely on the dead-block check
(bd_blocknr != bd_oblocknr) to implicitly skip the -ENOENT case,
which breaks when bd_oblocknr is also 0.
This same fix also resolves a related syzbot report that hits the
same root cause through the level-0 path (nilfs_mdt_get_block)
rather than nilfs_bmap_mark. I applied the patch on top of
current master (bbeb83d3182a) and tested it locally against that
report's C reproducer in QEMU -- the warning no longer triggers.
https://syzkaller.appspot.com/bug?extid=466a45fcfb0562f5b9a0
For that related report, when the patch is picked up:
Reported-by: syzbot+466a45fcfb0562f5b9a0@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=466a45fcfb0562f5b9a0
Tested-by: Junjie Cao <junjie.cao@linux.dev>
prev parent reply other threads:[~2026-03-25 8:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 9:19 [PATCH] nilfs2: fix missing continue after -ENOENT in nilfs_ioctl_mark_blocks_dirty() Deepanshu Kartikey
2026-03-20 17:32 ` Ryusuke Konishi
2026-03-25 8:35 ` Junjie Cao [this message]
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=20260325083520.501618-1-junjie.cao@linux.dev \
--to=junjie.cao@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=kartikey406@gmail.com \
--cc=konishi.ryusuke@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nilfs@vger.kernel.org \
--cc=sato.koji@lab.ntt.co.jp \
--cc=slava@dubeyko.com \
--cc=syzbot+98a040252119df0506f8@syzkaller.appspotmail.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