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
(cherry picked from commit 2b612c9d3bb528551de9eaabbdbadae89a36ba8b)

Details

Provenance
rmacklemAuthored on Aug 26 2022, 3:33 AM
Parents
rGa6f3979ad192: nfscl: Fix handling of nd_slotid while handling NFSERR_BADSESSION
Branches
Unknown
Tags
Unknown