svn commit: r234051 - in stable/8/sys: fs/nfsserver i386/conf

Rick Macklem rmacklem at FreeBSD.org
Mon Apr 9 04:05:23 UTC 2012


Author: rmacklem
Date: Mon Apr  9 04:05:22 2012
New Revision: 234051
URL: http://svn.freebsd.org/changeset/base/234051

Log:
  MFC: r2323467
  The name caching changes of r230394 exposed an intermittent bug
  in the new NFS server for NFSv4, where it would report ENOENT
  when the file actually existed on the server. This turned out
  to be caused by not initializing ni_topdir before calling lookup()
  and there was a rare case where the value on the stack location
  assigned to ni_topdir happened to be a pointer to a ".." entry,
  such that "dp == ndp->ni_topdir" succeeded in lookup().
  This patch initializes ni_topdir to fix the problem.

Modified:
  stable/8/sys/fs/nfsserver/nfs_nfsdport.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- stable/8/sys/fs/nfsserver/nfs_nfsdport.c	Mon Apr  9 03:39:50 2012	(r234050)
+++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c	Mon Apr  9 04:05:22 2012	(r234051)
@@ -390,6 +390,7 @@ nfsvno_namei(struct nfsrv_descript *nd, 
 	cnp->cn_thread = p;
 	ndp->ni_startdir = dp;
 	ndp->ni_rootdir = rootvnode;
+	ndp->ni_topdir = NULL;
 
 	if (!lockleaf)
 		cnp->cn_flags |= LOCKLEAF;


More information about the svn-src-stable-8 mailing list