]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
nfsd: fix session slot handling for failed callbacks
authorRick Macklem <rmacklem@FreeBSD.org>
Fri, 23 Apr 2021 22:24:47 +0000 (15:24 -0700)
committerRick Macklem <rmacklem@FreeBSD.org>
Mon, 10 May 2021 15:51:18 +0000 (08:51 -0700)
commitc86420ea7dcda16b4fd32c19cde54b128677f371
treee1aa7b389a675b6114cede1fb6d4267951bd215b
parent9186e4eb65c0fcff07729893f395b4dfbb9f09c6
nfsd: fix session slot handling for failed callbacks

When the NFSv4.1/4.2 server does a callback to a client
on the back channel, it will use a session slot in the
back channel session. If the back channel has failed,
the callback will fail and, without this patch, the
session slot will not be released.
As more callbacks are attempted, all session slots
can become busy and then the nfsd thread gets stuck
waiting for a back channel session slot.

This patch frees the session slot upon callback
failure to avoid this problem.

Without this patch, the problem can be avoided by leaving
delegations disabled in the NFS server.

(cherry picked from commit 4281bfec36285e2212f41568459c077bf4dbd91c)
sys/fs/nfsserver/nfs_nfsdstate.c