]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: drop ASSERT(0) on unrecognized log item type
authorWeiming Shi <bestswngs@gmail.com>
Thu, 2 Jul 2026 16:19:58 +0000 (09:19 -0700)
committerCarlos Maiolino <cem@kernel.org>
Tue, 7 Jul 2026 07:57:19 +0000 (09:57 +0200)
commit5b4396e12cb10fa89ca0a272fae2b5408cfeaa91
tree59d1b49f6a7e4b8907a525907d5497bf7170884f
parente4281086ae6caf006b6ef0670479eb5f96880fb9
xfs: drop ASSERT(0) on unrecognized log item type

The item type passed to ITEM_TYPE() comes from the on-disk log, so a
fuzzed or crafted image can reach the "unrecognized type" path in
xlog_recover_reorder_trans() and trip its ASSERT(0) on a
CONFIG_XFS_DEBUG kernel.  The -EFSCORRUPTED return handles it fine; drop
the assert.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Weiming Shi <bestswngs@gmail.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_log_recover.c