svn commit: r229258 - stable/9/sys/fs/nfsclient
Rick Macklem
rmacklem at FreeBSD.org
Mon Jan 2 03:26:59 UTC 2012
Author: rmacklem
Date: Mon Jan 2 03:26:59 2012
New Revision: 229258
URL: http://svn.freebsd.org/changeset/base/229258
Log:
MFC: r227494
Since NFSv4 byte range locking only works for regular files,
add a sanity check for the vnode type to the NFSv4 client.
Modified:
stable/9/sys/fs/nfsclient/nfs_clvnops.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)
Modified: stable/9/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- stable/9/sys/fs/nfsclient/nfs_clvnops.c Mon Jan 2 00:46:13 2012 (r229257)
+++ stable/9/sys/fs/nfsclient/nfs_clvnops.c Mon Jan 2 03:26:59 2012 (r229258)
@@ -2941,6 +2941,8 @@ nfs_advlock(struct vop_advlock_args *ap)
u_quad_t size;
if (NFS_ISV4(vp) && (ap->a_flags & (F_POSIX | F_FLOCK)) != 0) {
+ if (vp->v_type != VREG)
+ return (EINVAL);
if ((ap->a_flags & F_POSIX) != 0)
cred = p->p_ucred;
else
More information about the svn-src-stable-9
mailing list