Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Jul 2017 19:36:44 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r321057 - stable/10/sys/fs/nfsclient
Message-ID:  <201707161936.v6GJaiOF021850@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Sun Jul 16 19:36:44 2017
New Revision: 321057
URL: https://svnweb.freebsd.org/changeset/base/321057

Log:
  MFC: r320458
  Fix an NFSv3 client case that probably never happens.
  
  If an NFSv3 server were to reply with weak cache consistency attributes,
  but not post operation attributes, the client would use garbage attributes
  from memory. This was spotted during work on the code for the NFSv4.1 client.
  I have never seen evidence that this happens and it wouldn't make sense
  for an NFSv3 server to do this, so this patch is basically "theoretical",
  but does fix the problem if a server were to do the above.

Modified:
  stable/10/sys/fs/nfsclient/nfs_clport.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/nfsclient/nfs_clport.c
==============================================================================
--- stable/10/sys/fs/nfsclient/nfs_clport.c	Sun Jul 16 19:25:18 2017	(r321056)
+++ stable/10/sys/fs/nfsclient/nfs_clport.c	Sun Jul 16 19:36:44 2017	(r321057)
@@ -666,6 +666,8 @@ nfscl_wcc_data(struct nfsrv_descript *nd, struct vnode
 			}
 		}
 		error = nfscl_postop_attr(nd, nap, flagp, stuff);
+		if (wccflagp != NULL && *flagp == 0)
+			*wccflagp = 0;
 	} else if ((nd->nd_flag & (ND_NOMOREDATA | ND_NFSV4 | ND_V4WCCATTR))
 	    == (ND_NFSV4 | ND_V4WCCATTR)) {
 		error = nfsv4_loadattr(nd, NULL, &nfsva, NULL,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707161936.v6GJaiOF021850>