HomeFreeBSD

nfsd: fix replies from session cache for retried RPCs

Description

nfsd: fix replies from session cache for retried RPCs

Recent testing of network partitioning a FreeBSD NFSv4.1
server from a Linux NFSv4.1 client identified problems
with both the FreeBSD server and Linux client.

The FreeBSD server failed to reply using the cached
reply in the session slot when an RPC was retried on
the session slot, as indicated by same slot sequence#.

This patch fixes this. It should also fix a similar
failure for NFSv4.0 mounts, when the sequence# in
the open/lock_owner requires a reply be done from
an entry locked into the DRC.

This fix affects the fairly rare case where a NFSv4
client retries a non-idempotent RPC, such as a lock
operation. Note that retries only occur after the
client has needed to create a new TCP connection.

(cherry picked from commit 05a39c2c1c18cd0c4382a4f58e0952d3f77e7dfa)

Details

Provenance
rmacklemAuthored on Apr 8 2021, 9:04 PM
Parents
rG550fcd830db7: Fix leak in libc NFSv4 ACL flags parsing
Branches
Unknown
Tags
Unknown