Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Mar 2012 16:13:20 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r232467 - head/sys/fs/nfsserver
Message-ID:  <201203031613.q23GDKv4089769@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Sat Mar  3 16:13:20 2012
New Revision: 232467
URL: http://svn.freebsd.org/changeset/base/232467

Log:
  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.
  
  MFC after:	5 days

Modified:
  head/sys/fs/nfsserver/nfs_nfsdport.c

Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdport.c	Sat Mar  3 15:38:01 2012	(r232466)
+++ head/sys/fs/nfsserver/nfs_nfsdport.c	Sat Mar  3 16:13:20 2012	(r232467)
@@ -395,6 +395,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;



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