]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: don't report half-built inodes to fserror
authorDarrick J. Wong <djwong@kernel.org>
Wed, 18 Feb 2026 23:25:38 +0000 (15:25 -0800)
committerCarlos Maiolino <cem@kernel.org>
Wed, 25 Feb 2026 12:58:49 +0000 (13:58 +0100)
commit115ea07b94d2f13942fbd93c6acde376db36b16a
treeaa566adac837ea03d4a9142f4da0446da7337d6b
parent75690e5fdd74fc4d2a4aec58be9a82aec7cee721
xfs: don't report half-built inodes to fserror

Sam Sun apparently found a syzbot way to fuzz a filesystem such that
xfs_iget_cache_miss would free the inode before the fserror code could
catch up.  Frustratingly he doesn't use the syzbot dashboard so there's
no C reproducer and not even a full error report, so I'm guessing that:

Inodes that are being constructed or torn down inside XFS are not
visible to the VFS.  They should never be reported to fserror.
Also, any inode that has been freshly allocated in _cache_miss should be
marked INEW immediately because, well, it's an incompletely constructed
inode that isn't yet visible to the VFS.

Reported-by: Sam Sun <samsun1006219@gmail.com>
Fixes: 5eb4cb18e445d0 ("xfs: convey metadata health events to the health monitor")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_health.c
fs/xfs/xfs_icache.c