Fix a LOR between the NFS server and server side krpc.
authorrmacklem <rmacklem@FreeBSD.org>
Fri, 18 Sep 2020 23:52:56 +0000 (23:52 +0000)
committerrmacklem <rmacklem@FreeBSD.org>
Fri, 18 Sep 2020 23:52:56 +0000 (23:52 +0000)
commit78a7c9ffec80fa7e135f3fb488a71d4ad1614b47
tree17568568020962a0c89a3023df4f5eb36a0f3047
parent197490d25f6e30ac948cc6eb37a490ed2ea53dd6
Fix a LOR between the NFS server and server side krpc.

Recent testing of the NFS-over-TLS code found a LOR between the mutex lock
used for sessions and the sleep lock used for server side krpc socket
structures in nfsrv_checksequence().  This was fixed by r365789.
A similar bug exists in nfsrv_bindconnsess(), where SVC_RELEASE() is called
while mutexes are held.
This patch applies a fix similar to r365789, moving the SVC_RELEASE() call
down to after the mutexes are released.

This patch fixes the problem by moving the SVC_RELEASE() call in
nfsrv_checksequence() down a few lines to below where the mutex is released.

MFC after: 1 week
sys/fs/nfsserver/nfs_nfsdstate.c