Skip to content

nfsd: fix handling of timed out idmap lookups

Chuck Lever linux-nfs 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 0 repliesNew

Changes in v2 from the cover letter

- Address review comments
- Add Cc: stable tag

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2nfsd: never defer requests during idmap lookupfs/nfsd/nfs4idmap.c fs/nfsd/nfs4proc.c fs/nfsd/nfs4xdr.c+58 -80 replies
2/2nfsd: fix return error code for nfsd_map_name_to_[ug]idfs/nfsd/nfs4idmap.c+4 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchNeilBrown
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] nfsd: fix handling of timed out idmap lookups

From: Chuck Lever <[email protected]>

Following up on:

https://lore.kernel.org/linux-nfs/[email protected]/#r

This series addresses an issue occurring during v4 compound decoding, when idmap lookup upcall responses are delayed in userspace. This causes the related request to be marked for deferral and to be dropped, preventing nfs4svc_encode_compoundres from being executed and thus never clearing the session slot flag NFSD4_SLOT_INUSE. Subsequent requests will fail with NFSERR_JUKEBOX, given that the slot will be marked as in use.

The first patch fixes this by making sure that no deferrals can happen during decoding.

The second patch fixes the return code of delayed idmap lookups, so that clients will retry the operation instead of aborting with an error.

Changes since v1:
- Address review comments
- Add Cc: stable tag

Anthony Iliopoulos (2):
nfsd: never defer requests during idmap lookup
nfsd: fix return error code for nfsd_map_name_to_[ug]id

 fs/nfsd/nfs4idmap.c | 52 +++++++++++++++++++++++++++++++++++++++------
 fs/nfsd/nfs4proc.c  |  2 --
 fs/nfsd/nfs4xdr.c   | 16 ++++++++++++++
 3 files changed, 62 insertions(+), 8 deletions(-)
Signature · 1 line
2.52.0