diff options
| author | Rick Macklem <rmacklem@FreeBSD.org> | 2023-12-26 22:33:39 +0000 |
|---|---|---|
| committer | Rick Macklem <rmacklem@FreeBSD.org> | 2024-01-02 01:55:14 +0000 |
| commit | 263ed87413aece1786df7275cc541dad324c76a5 (patch) | |
| tree | ee36a23ce2618cd581141344702a5b362bff6eed /sys | |
| parent | 9734bad3611c291798727ae9020f876304d4e849 (diff) | |
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/fs/nfs/nfs_commonkrpc.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index bc38f9aab6b1..3d6ea9efafd0 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -878,6 +878,22 @@ tryagain: } NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); error = ENXIO; + } else if (stat == RPC_AUTHERROR) { + /* Check for a session slot that needs to be free'd. */ + if ((nd->nd_flag & (ND_NFSV41 | ND_HASSLOTID)) == + (ND_NFSV41 | ND_HASSLOTID) && nmp != NULL && + nd->nd_procnum != NFSPROC_NULL) { + /* + * This can occur when a Kerberos/RPCSEC_GSS session + * expires, due to TGT expiration. + * Free the slot, resetting the slot's sequence#. + */ + if (sep == NULL) + sep = nfsmnt_mdssession(nmp); + nfsv4_freeslot(sep, nd->nd_slotid, true); + } + NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); + error = EACCES; } else { NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); error = EACCES; |
