diff options
author | Rick Macklem <rmacklem@FreeBSD.org> | 2012-04-27 20:23:24 +0000 |
---|---|---|
committer | Rick Macklem <rmacklem@FreeBSD.org> | 2012-04-27 20:23:24 +0000 |
commit | a607cc6d8e837770675657b8dd2a086a46f26edd (patch) | |
tree | 8d2c0338c31a72765150b34a0b463f0b43159c57 /sys/fs | |
parent | f502124c06a0aca096799afa0814ffee6cbdb221 (diff) | |
download | src-a607cc6d8e837770675657b8dd2a086a46f26edd.tar.gz src-a607cc6d8e837770675657b8dd2a086a46f26edd.zip |
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.
Tested by: Oliver Brandmueller (ob at gruft.de), hrs
PR: kern/167266
MFC after: 1 month
Notes
Notes:
svn path=/head/; revision=234740
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/nfsserver/nfs_nfsdport.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 2c0e33d1c263..009ea000ae8a 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -1047,6 +1047,8 @@ nfsvno_removesub(struct nameidata *ndp, int is_v4, struct ucred *cred, 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); } |