svn commit: r236134 - stable/9/sys/fs/nfsserver

Rick Macklem rmacklem at FreeBSD.org
Sun May 27 01:24:09 UTC 2012


Author: rmacklem
Date: Sun May 27 01:24:08 2012
New Revision: 236134
URL: http://svn.freebsd.org/changeset/base/236134

Log:
  MFC: r234740
  Fix a leak of namei lookup path buffers that occurs when a
  ZFS volume is exported via the new NFS server. The leak occurred
  because the new NFS server code didn't handle the case where
  a file system sets the SAVENAME flag in its VOP_LOOKUP() and
  ZFS does this for the DELETE case.

Modified:
  stable/9/sys/fs/nfsserver/nfs_nfsdport.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/dev/   (props changed)
  stable/9/sys/dev/e1000/   (props changed)
  stable/9/sys/dev/ixgbe/   (props changed)
  stable/9/sys/fs/   (props changed)
  stable/9/sys/fs/ntfs/   (props changed)
  stable/9/sys/modules/   (props changed)

Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- stable/9/sys/fs/nfsserver/nfs_nfsdport.c	Sun May 27 00:38:36 2012	(r236133)
+++ stable/9/sys/fs/nfsserver/nfs_nfsdport.c	Sun May 27 01:24:08 2012	(r236134)
@@ -1047,6 +1047,8 @@ nfsvno_removesub(struct nameidata *ndp, 
 	else
 		vput(ndp->ni_dvp);
 	vput(vp);
+	if ((ndp->ni_cnd.cn_flags & SAVENAME) != 0)
+		nfsvno_relpathbuf(ndp);
 	NFSEXITCODE(error);
 	return (error);
 }
@@ -1086,6 +1088,8 @@ out:
 	else
 		vput(ndp->ni_dvp);
 	vput(vp);
+	if ((ndp->ni_cnd.cn_flags & SAVENAME) != 0)
+		nfsvno_relpathbuf(ndp);
 	NFSEXITCODE(error);
 	return (error);
 }


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