From: Christoph Hellwig <hch@infradead.org>
To: Zheng Shuhao <viennaoffh@gmail.com>
Cc: hch@infradead.org, linux-xfs@vger.kernel.org,
linux-kernel@vger.kernel.org, cem@kernel.org, djwong@kernel.org,
kees@kernel.org,
syzbot+e7f24354da9f7915bc54@syzkaller.appspotmail.com,
stable@vger.kernel.org
Subject: Re: [PATCH v2] xfs: fix slab-use-after-free in xrep_newbt_free()
Date: Tue, 1 Dec 2026 23:28:34 -0800 [thread overview]
Message-ID: <aw_Iouzu7DU0LAXj@infradead.org> (raw)
In-Reply-To: <179612565993.8180.4618957562824780414@gmail.com>
On Tue, Dec 01, 2026 at 07:47:39PM +0800, Zheng Shuhao wrote:
> > So the condition here is not "is the file system shut down" but:
> > did a defer_finish fail for this chain, and the logic needs to represent that.
>
> I see... Would `if (!list_empty(&sc->tp->t_dfops))` be the right check
> here? Or should I add an explicit flag? That would make the change more
> involved. I'll take another look.
Using the control flow instead of global state is usually preferable.
I.e. check which path can free the autoreap information and treat them
differently using a goto or similar. I think the only relevant call
is xrep_newbt_free in the xrep_newbt_free loop, but I'm not an expert
on this code, so please double check.
prev parent reply other threads:[~2026-12-02 7:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 10:53 Zheng Shuhao
2026-12-01 8:58 ` Christoph Hellwig
2026-12-01 11:47 ` Zheng Shuhao
2026-12-02 7:28 ` Christoph Hellwig [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=aw_Iouzu7DU0LAXj@infradead.org \
--to=hch@infradead.org \
--cc=cem@kernel.org \
--cc=djwong@kernel.org \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=syzbot+e7f24354da9f7915bc54@syzkaller.appspotmail.com \
--cc=viennaoffh@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
all inboxes | Powered by JetHome®