diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2012-03-03 16:13:20 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2012-03-03 16:13:20 +0000 |
commit | 432277f0fa34fb827e6809b0718ed2becb42d26e (patch) | |
tree | dbab013255d4c895d382b9d219c5fe7b8f5a16e3 /sys/fs/nfsserver | |
parent | 2dd794d91e9a5b42a4f00f1b8b02b433913175c8 (diff) | |
download | FreeBSD-src-432277f0fa34fb827e6809b0718ed2becb42d26e.zip FreeBSD-src-432277f0fa34fb827e6809b0718ed2becb42d26e.tar.gz |
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
Diffstat (limited to 'sys/fs/nfsserver')
-rw-r--r-- | sys/fs/nfsserver/nfs_nfsdport.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index d7fa1f6..d67f7e6 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -395,6 +395,7 @@ nfsvno_namei(struct nfsrv_descript *nd, struct nameidata *ndp, cnp->cn_thread = p; ndp->ni_startdir = dp; ndp->ni_rootdir = rootvnode; + ndp->ni_topdir = NULL; if (!lockleaf) cnp->cn_flags |= LOCKLEAF; |