]> 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>
Fri, 23 Apr 2021 22:24:47 +0000 (15:24 -0700)
commit4281bfec36285e2212f41568459c077bf4dbd91c
tree05040fa2465f9526dec288841f6c955929b4a352
parent576b477ba41c9916fae3a83e6b4dd98c682a0c2f
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.

MFC after: 2 weeks
sys/fs/nfsserver/nfs_nfsdstate.c