linux/fs/nfsd
Anthony Iliopoulos d75ec4504a nfsd: never defer requests during idmap lookup
[ Upstream commit f9c206cdc4 ]

During v4 request compound arg decoding, some ops (e.g. SETATTR)
can trigger idmap lookup upcalls. When those upcall responses get
delayed beyond the allowed time limit, cache_check() will mark the
request for deferral and cause it to be dropped.

This prevents nfs4svc_encode_compoundres from being executed, and
thus the session slot flag NFSD4_SLOT_INUSE never gets cleared.
Subsequent client requests will fail with NFSERR_JUKEBOX, given
that the slot will be marked as in-use, making the SEQUENCE op
fail.

Fix this by making sure that the RQ_USEDEFERRAL flag is always
clear during nfs4svc_decode_compoundargs(), since no v4 request
should ever be deferred.

Fixes: 2f425878b6 ("nfsd: don't use the deferral service, return NFS4ERR_DELAY")
Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-02-26 14:59:18 -08:00
..
acl.h NFSD: add posix ACLs to struct nfsd_attrs 2022-08-04 10:28:03 -04: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 NFSD: use correct reservation type in nfsd4_scsi_fence_client 2026-01-02 12:57:16 +01:00
blocklayoutxdr.c NFSD: Implement large extent array support in pNFS 2025-09-21 19:24:50 -04:00
blocklayoutxdr.h NFSD: Implement large extent array support in pNFS 2025-09-21 19:24:50 -04: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: Add io_cache_{read,write} controls to debugfs 2025-10-01 15:54:01 -04:00
export.c nfsd: Mark variable __maybe_unused to avoid W=1 build break 2026-01-02 12:57:24 +01:00
export.h NFSD 6.18 Release Notes 2025-10-06 13:22:21 -07:00
filecache.c NFSD 6.18 Release Notes 2025-10-06 13:22:21 -07:00
filecache.h NFSD 6.18 Release Notes 2025-10-06 13:22:21 -07:00
flexfilelayout.c NFSD: Define a proc_layoutcommit for the FlexFiles layout type 2025-10-10 12:53:50 -04: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: Don't force CRYPTO_LIB_SHA256 to be built-in 2025-09-21 19:24:50 -04: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 /sys/kernel/debug/nfsd 2025-05-11 19:48:23 -04:00
netlink.c nfsd: new netlink ops to get/set server pool_mode 2024-07-08 14:10:05 -04:00
netlink.h nfsd: new netlink ops to get/set server pool_mode 2024-07-08 14:10:05 -04:00
netns.h nfsd: provide locking for v4_end_grace 2026-01-17 16:35:10 +01:00
nfs2acl.c NFS: NFSERR_INVAL is not defined by NFSv2 2026-02-26 14:59:18 -08:00
nfs3acl.c nfsd: clear acl_access/acl_default after releasing them 2025-02-02 11:31:45 -05:00
nfs3proc.c sunrpc: simplify xdr_init_encode_pages 2025-07-14 12:46:37 -04:00
nfs3xdr.c nfsd: Use lookup_one() rather than lookup_one_len() 2025-04-07 09:25:32 +02:00
nfs4acl.c NFSD: Remove unnecessary posix_acl_entry pointer initialization 2024-11-11 13:41:58 -05:00
nfs4callback.c NFSD: Avoid corruption of a referring call list 2025-06-12 20:37:32 -04:00
nfs4idmap.c nfsd: never defer requests during idmap lookup 2026-02-26 14:59:18 -08:00
nfs4layouts.c NFSD: Rework encoding and decoding of nfsd4_deviceid 2025-09-21 19:24:50 -04:00
nfs4proc.c nfsd: never defer requests during idmap lookup 2026-02-26 14:59:18 -08:00
nfs4recover.c nfsd: Eliminate an allocation in nfs4_make_rec_clidname() 2025-09-21 19:24:50 -04:00
nfs4state.c nfsd: check that server is running in unlock_filesystem 2026-01-17 16:35:10 +01:00
nfs4xdr.c nfsd: never defer requests during idmap lookup 2026-02-26 14:59:18 -08:00
nfs4xdr_gen.c nfsd: rename NFS4_SHARE_WANT_* constants to OPEN4_SHARE_ACCESS_WANT_* 2025-01-21 15:30:01 -05:00
nfs4xdr_gen.h nfsd: rename NFS4_SHARE_WANT_* constants to OPEN4_SHARE_ACCESS_WANT_* 2025-01-21 15:30:01 -05:00
nfscache.c NFSD: Reduce DRC bucket size 2025-09-21 19:24:50 -04:00
nfsctl.c nfsd: check that server is running in unlock_filesystem 2026-01-17 16:35:10 +01:00
nfsd.h NFSD: Remove NFSERR_EAGAIN 2026-01-17 16:35:10 +01: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-02-26 14:59:18 -08:00
nfssvc.c NFSD: net ref data still needs to be freed even if net hasn't startup 2026-01-17 16:35:10 +01: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: check that server is running in unlock_filesystem 2026-01-17 16:35:10 +01: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: filecache: add STATX_DIOALIGN and STATX_DIO_READ_ALIGN support 2025-09-30 16:10:05 -04:00
vfs.c NFSD: Fix permission check for read access to executable-only files 2026-01-17 16:35:10 +01:00
vfs.h NFSD: NFSv4 file creation neglects setting ACL 2026-01-02 12:57:23 +01: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: ensure SEQUENCE replay sends a valid reply. 2025-11-10 09:31:52 -05:00
xdr4cb.h NFSD: Implement CB_SEQUENCE referring call lists 2025-05-11 19:48:20 -04:00