freebsd-dev/sys/fs/nfsclient
Rick Macklem 73b1879c2d Add a couple of safety belt checks to the NFSv4.1 client related to sessions.
There were a couple of cases in newnfs_request() that it assumed that it
was an NFSv4.1 mount with a session. This should always be the case when
a Sequence operation is in the reply or the server replies NFSERR_BADSESSION.
However, if a server was broken and sent an erroneous reply, these safety
belt checks should avoid trouble.
The one check required a small tweak to nfsmnt_mdssession() so that it
returns NULL when there is no session instead of the offset of the field
in the structure (0x8 for i386).
This patch should have no effect on normal operation of the client.
Found by inspection during pNFS server development.

MFC after:	2 weeks
2018-06-11 19:00:07 +00:00
..
nfs_clbio.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
nfs_clcomsubs.c nfsclient: warnings cleanups 2018-05-20 06:14:12 +00:00
nfs_clkdtrace.c sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
nfs_clkrpc.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
nfs_clnfsiod.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
nfs_clnode.c style: Remove remaining deprecated MALLOC/FREE macros 2018-01-25 22:25:13 +00:00
nfs_clport.c Fix use of pointer after being set NULL. 2018-04-20 11:38:29 +00:00
nfs_clrpcops.c Fix the default number of threads for Flex File layout pNFS client I/O. 2018-06-02 00:11:26 +00:00
nfs_clstate.c Add checks for the Flexible File layout to LayoutRecall callbacks. 2018-06-10 19:03:21 +00:00
nfs_clsubs.c style: Remove remaining deprecated MALLOC/FREE macros 2018-01-25 22:25:13 +00:00
nfs_clvfsops.c style: Remove remaining deprecated MALLOC/FREE macros 2018-01-25 22:25:13 +00:00
nfs_clvnops.c style: Remove remaining deprecated MALLOC/FREE macros 2018-01-25 22:25:13 +00:00
nfs_kdtrace.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
nfs.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
nfsmount.h Add a couple of safety belt checks to the NFSv4.1 client related to sessions. 2018-06-11 19:00:07 +00:00
nfsnode.h style: Remove remaining deprecated MALLOC/FREE macros 2018-01-25 22:25:13 +00:00
nlminfo.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00