HomeFreeBSD

nfscl: Fix handling of a bad session slot (NFSv4.1/4.2)

Description

nfscl: Fix handling of a bad session slot (NFSv4.1/4.2)

When a session has been marked defunct by the server
sending a NFSERR_BADSESSION reply to the NFSv4.1/4.2
client, nfsv4_sequencelookup() returns NFSERR_BADSESSION
without actually assigning a session slot.
Without this patch, newnfs_request() would erroneously
free slot 0.

This could result in the slot being reused prematurely,
but most likely just generated a "freeing free slot!!"
console message.

This patch fixes the code to not do the erroneous
freeing of the slot for this case.

PR: 260011
MFC after: 1 week

Details

Provenance
rmacklemAuthored on Aug 26 2022, 3:33 AM
Parents
rGc1a0ab5ec525: amd64: update comment for casueword/casueword32, mentioning return value 1
Branches
Unknown
Tags
Unknown