Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Christoph Hellwig and committed by
Carlos Maiolino
0f41997b ca3d643a

+1 -1
+1 -1
fs/xfs/xfs_super.c
··· 2227 2227 struct xfs_mount *mp; 2228 2228 int i; 2229 2229 2230 - mp = kzalloc(sizeof(struct xfs_mount), GFP_KERNEL | __GFP_NOFAIL); 2230 + mp = kzalloc(sizeof(struct xfs_mount), GFP_KERNEL); 2231 2231 if (!mp) 2232 2232 return -ENOMEM; 2233 2233