From: Christoph Hellwig <hch@infradead.org>
To: Zheng Shuhao <viennaoffh@gmail.com>
Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Carlos Maiolino <cem@kernel.org>,
"Darrick J. Wong" <djwong@kernel.org>,
Kees Cook <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 00:58:47 -0800 [thread overview]
Message-ID: <aw6MR-oAfzOE5HTg@infradead.org> (raw)
In-Reply-To: <179594961807.35052.14164978078383342786@gmail.com>
On Sun, Nov 29, 2026 at 06:53:38PM +0800, Zheng Shuhao wrote:
> list_for_each_entry_safe(resv, n, &xnr->resv_list, list) {
> - xfs_alloc_commit_autoreap(sc->tp, &resv->autoreap);
> + if (!xfs_is_shutdown(sc->mp))
> + xfs_alloc_commit_autoreap(sc->tp, &resv->autoreap);
I don't think this is the correct check, and the commit log does not
describe the situation correctly.
A shutdown does not free deferred items. A failing
xfs_defer_finish_noroll just happens to call xfs_defer_cancel_list
AND shuts down the file systems. 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.
next prev parent reply other threads:[~2026-12-01 8:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 10:53 Zheng Shuhao
2026-12-01 8:58 ` Christoph Hellwig [this message]
2026-12-01 11:47 ` Zheng Shuhao
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=aw6MR-oAfzOE5HTg@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®