freebsd-nq/sys/fs/nfsserver
Rick Macklem 440e2f9e91 Strengthen locking for the NFSv4.1 server DestroySession operation.
If a client did a DestroySession on a session while it was still in use,
the server might try to use the session structure after it is free'd.
I think the client has violated RFC5661 if it does this, but this patch
makes DestroySession block all other nfsd threads so no thread could
be using the session when it is free'd. After the DestroySession, nfsd
threads will not be able to find the session. The patch also adds a check
for nd_sessionid being set, although if that was not the case it would have
been all 0s and unlikely to have a false match.
This might fix the crashes described in PR#228497 for the FreeNAS server.

PR:		228497
MFC after:	1 week
2018-05-30 20:16:17 +00:00
..
nfs_fha_new.c sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
nfs_fha_new.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
nfs_nfsdcache.c style: Remove remaining deprecated MALLOC/FREE macros 2018-01-25 22:25:13 +00:00
nfs_nfsdkrpc.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
nfs_nfsdport.c style: Remove remaining deprecated MALLOC/FREE macros 2018-01-25 22:25:13 +00:00
nfs_nfsdserv.c Fix the eir_server_scope reply argument for NFSv4.1 ExchangeID. 2018-05-13 23:38:01 +00:00
nfs_nfsdsocket.c Add support for the TestStateID operation to the NFSv4.1 server. 2018-05-11 22:16:23 +00:00
nfs_nfsdstate.c Strengthen locking for the NFSv4.1 server DestroySession operation. 2018-05-30 20:16:17 +00:00
nfs_nfsdsubs.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00