]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: get rid of the xchk_xfile_*_descr calls
authorDarrick J. Wong <djwong@kernel.org>
Fri, 23 Jan 2026 17:27:37 +0000 (09:27 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 23 Jan 2026 17:27:37 +0000 (09:27 -0800)
commit60382993a2e18041f88c7969f567f168cd3b4de3
tree3a07b88e4cfefd4d93f6569b87f9c52c3d68d527
parenteaec8aeff31d0679eadb27a13a62942ddbfd7b87
xfs: get rid of the xchk_xfile_*_descr calls

The xchk_xfile_*_descr macros call kasprintf, which can fail to allocate
memory if the formatted string is larger than 16 bytes (or whatever the
nofail guarantees are nowadays).  Some of them could easily exceed that,
and Jiaming Zhang found a few places where that can happen with syzbot.

The descriptions are debugging aids and aren't required to be unique, so
let's just pass in static strings and eliminate this path to failure.
Note this patch touches a number of commits, most of which were merged
between 6.6 and 6.14.

Cc: r772577952@gmail.com
Cc: <stable@vger.kernel.org> # v6.12
Fixes: ab97f4b1c03075 ("xfs: repair AGI unlinked inode bucket lists")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Jiaming Zhang <r772577952@gmail.com>
19 files changed:
fs/xfs/scrub/agheader_repair.c
fs/xfs/scrub/alloc_repair.c
fs/xfs/scrub/attr_repair.c
fs/xfs/scrub/bmap_repair.c
fs/xfs/scrub/common.h
fs/xfs/scrub/dir.c
fs/xfs/scrub/dir_repair.c
fs/xfs/scrub/dirtree.c
fs/xfs/scrub/ialloc_repair.c
fs/xfs/scrub/nlinks.c
fs/xfs/scrub/parent.c
fs/xfs/scrub/parent_repair.c
fs/xfs/scrub/quotacheck.c
fs/xfs/scrub/refcount_repair.c
fs/xfs/scrub/rmap_repair.c
fs/xfs/scrub/rtbitmap_repair.c
fs/xfs/scrub/rtrefcount_repair.c
fs/xfs/scrub/rtrmap_repair.c
fs/xfs/scrub/rtsummary.c