linux/fs/nfsd
Kees Cook 189f164e57 Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses
Conversion performed via this Coccinelle script:

  // SPDX-License-Identifier: GPL-2.0-only
  // Options: --include-headers-for-types --all-includes --include-headers --keep-comments
  virtual patch

  @gfp depends on patch && !(file in "tools") && !(file in "samples")@
  identifier ALLOC = {kmalloc_obj,kmalloc_objs,kmalloc_flex,
 		    kzalloc_obj,kzalloc_objs,kzalloc_flex,
		    kvmalloc_obj,kvmalloc_objs,kvmalloc_flex,
		    kvzalloc_obj,kvzalloc_objs,kvzalloc_flex};
  @@

  	ALLOC(...
  -		, GFP_KERNEL
  	)

  $ make coccicheck MODE=patch COCCI=gfp.cocci

Build and boot tested x86_64 with Fedora 42's GCC and Clang:

Linux version 6.19.0+ (user@host) (gcc (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7), GNU ld version 2.44-12.fc42) #1 SMP PREEMPT_DYNAMIC 1970-01-01
Linux version 6.19.0+ (user@host) (clang version 20.1.8 (Fedora 20.1.8-4.fc42), LLD 20.1.8) #1 SMP PREEMPT_DYNAMIC 1970-01-01

Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-22 08:26:33 -08:00
..
acl.h NFSD: Add support for XDR decoding POSIX draft ACLs 2026-01-29 09:48:33 -05:00
auth.c nfsd: avoid pointless cred reference count bump 2024-12-02 11:25:14 +01:00
auth.h nfsd: Pass 'cred' instead of 'rqstp' to some functions. 2024-09-20 19:31:03 -04:00
blocklayout.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
blocklayoutxdr.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
blocklayoutxdr.h NFSD/blocklayout: Introduce layout content structure 2025-11-16 18:20:11 -05:00
cache.h nfsd: don't allocate the versions array. 2024-09-20 19:29:23 -04:00
current_stateid.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
debugfs.c NFSD: Implement NFSD_IO_DIRECT for NFS WRITE 2025-12-01 09:57:10 -05:00
export.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
export.h NFSD 6.18 Release Notes 2025-10-06 13:22:21 -07:00
filecache.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
filecache.h nfsd: allow filecache to hold S_IFDIR files 2025-11-12 09:38:36 +01:00
flexfilelayout.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
flexfilelayoutxdr.c NFSD: Rework encoding and decoding of nfsd4_deviceid 2025-09-21 19:24:50 -04:00
flexfilelayoutxdr.h NFSD: Make @gdev parameter of ->encode_getdeviceinfo a const pointer 2023-10-16 12:44:29 -04:00
idmap.h nfsd: Remove duplicate define of IDMAP_NAMESZ/IDMAP_TYPE_xx 2015-07-20 14:58:46 -04:00
Kconfig NFSD: Add a Kconfig setting to enable support for NFSv4 POSIX ACLs 2026-01-29 09:48:33 -05:00
localio.c NFSD 6.18 Release Notes 2025-10-06 13:22:21 -07:00
lockd.c nfsd: discard nfserr_dropit 2025-10-01 15:54:01 -04:00
Makefile NFSD: Add instructions on how to deal with xdrgen files 2026-01-26 10:10:58 -05:00
netlink.c nfsd: add controls to set the minimum number of threads per pool 2026-01-28 10:15:42 -05:00
netlink.h tools: ynl-gen: add regeneration comment 2025-11-25 19:20:42 -08:00
netns.h nfsd: add controls to set the minimum number of threads per pool 2026-01-28 10:15:42 -05:00
nfs2acl.c NFS: NFSERR_INVAL is not defined by NFSv2 2026-01-26 10:10:58 -05:00
nfs3acl.c nfsd: clear acl_access/acl_default after releasing them 2025-02-02 11:31:45 -05:00
nfs3proc.c vfs-6.19-rc1.directory.locking 2025-12-01 16:13:46 -08:00
nfs3xdr.c nfsd: Use lookup_one() rather than lookup_one_len() 2025-04-07 09:25:32 +02:00
nfs4acl.c NFSD: Add support for XDR decoding POSIX draft ACLs 2026-01-29 09:48:33 -05:00
nfs4callback.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
nfs4idmap.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
nfs4layouts.c filelock: allow lease_managers to dictate what qualifies as a conflict 2025-12-15 15:20:33 +01:00
nfs4proc.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
nfs4recover.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
nfs4state.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
nfs4xdr_gen.c Add RPC language definition of NFSv4 POSIX ACL extension 2026-01-29 09:48:33 -05:00
nfs4xdr_gen.h Add RPC language definition of NFSv4 POSIX ACL extension 2026-01-29 09:48:33 -05:00
nfs4xdr.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
nfscache.c NFSD: Reduce DRC bucket size 2025-09-21 19:24:50 -04:00
nfsctl.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
nfsd.h NFSD: Add POSIX ACL file attributes to SUPPATTR bitmasks 2026-01-29 09:48:33 -05:00
nfsfh.c nfsd-6.18 fixes: 2025-11-12 18:41:01 -08:00
nfsfh.h NFSD: Move the fh_getattr() helper 2025-09-21 19:24:50 -04:00
nfsproc.c NFS: NFSERR_INVAL is not defined by NFSv2 2026-01-26 10:10:58 -05:00
nfssvc.c nfsd: add controls to set the minimum number of threads per pool 2026-01-28 10:15:42 -05:00
nfsxdr.c NFSD: Remove NFSSVC_MAXBLKSIZE_V2 macro 2025-05-15 16:16:28 -04:00
pnfs.h NFSD: Do the grace period check in ->proc_layoutget 2025-10-01 15:54:01 -04:00
state.h nfsd: cancel async COPY operations when admin revokes filesystem state 2026-01-28 10:15:42 -05:00
stats.c nfsd: don't ignore the return code of svc_proc_register() 2025-03-10 09:10:59 -04:00
stats.h nfsd: don't ignore the return code of svc_proc_register() 2025-03-10 09:10:59 -04:00
trace.c NFSD: Add SPDX header for fs/nfsd/trace.c 2020-11-30 13:00:24 -05:00
trace.h nfsd: add controls to set the minimum number of threads per pool 2026-01-28 10:15:42 -05:00
vfs.c NFSD: Refactor nfsd_setattr()'s ACL error reporting 2026-01-29 09:48:33 -05:00
vfs.h NFSD: Refactor nfsd_setattr()'s ACL error reporting 2026-01-29 09:48:33 -05:00
xdr.h NFSD: prevent underflow in nfssvc_decode_writeargs() 2022-03-15 09:35:56 -04:00
xdr3.h nfsd: Fix NFSv3 atomicity bugs in nfsd_setattr() 2024-03-01 09:12:33 -05:00
xdr4.h NFSD: Add support for XDR decoding POSIX draft ACLs 2026-01-29 09:48:33 -05:00
xdr4cb.h NFSD: Implement CB_SEQUENCE referring call lists 2025-05-11 19:48:20 -04:00