]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: don't use __GFP_NOFAIL in xfs_init_fs_context
authorChristoph Hellwig <hch@lst.de>
Fri, 3 Oct 2025 10:12:48 +0000 (12:12 +0200)
committerCarlos Maiolino <cem@kernel.org>
Tue, 21 Oct 2025 09:32:50 +0000 (11:32 +0200)
commit0f41997b1b2b769b73415512d2afaae80630e4fe
tree2409df5667bd0aa664832908468919208d0faa39
parentca3d643a970139f5456f90dd555a0955752d70cb
xfs: don't use __GFP_NOFAIL in xfs_init_fs_context

With enough debug options enabled, struct xfs_mount is larger
than 4k and thus NOFAIL allocations won't work for it.

xfs_init_fs_context is early in the mount process, and if we really
are out of memory there we'd better give up ASAP anyway.

Fixes: 7b77b46a6137 ("xfs: use kmem functions for struct xfs_mount")
Reported-by: syzbot+359a67b608de1ef72f65@syzkaller.appspotmail.com
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_super.c