]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
nfscl: Fix setup of Sequence when all slots marked bad
authorRick Macklem <rmacklem@FreeBSD.org>
Sun, 28 Aug 2022 21:36:45 +0000 (14:36 -0700)
committerRick Macklem <rmacklem@FreeBSD.org>
Fri, 16 Sep 2022 22:19:33 +0000 (15:19 -0700)
commit74cf968007f61d74592e08f6f67911eb7a6adf20
tree94cf866be702d28f5427676ba61c250807d34a3a
parentaa5a54d5a73865bc76a70b14baa319e6307d07f0
nfscl: Fix setup of Sequence when all slots marked bad

Commit 40ada74ee1da modified the NFSv4.1/4.2 client so
that it would issue a DestroySession to the server when
all session slots are marked bad.  Once this is done,
the Sequence operation should get a NFSERR_BADSESSION
reply from the server.

Without this patch, the code was setting ND_HASSLOTID
when, in fact, there was no slot marked in use by
nfsv4_sequencelookup().  This would result in the
code freeing a slot not in use.  The effect of this
was minimal, since the session was already destroyed.

This patch fixes the code so that it does not set
ND_HASSLOTID for this case.

(cherry picked from commit 117cea02a4dcd5757d1ed469a14110f4670dedea)
sys/fs/nfs/nfs_commonsubs.c