diff options
author | jhb <jhb@FreeBSD.org> | 2008-11-04 22:31:04 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2008-11-04 22:31:04 +0000 |
commit | fb34cedca4713fc2c3bebe2336bbb1046e446f1a (patch) | |
tree | 3d0601374fec25e854207b6cd97946aaf2cff7b3 /sys/kern | |
parent | d4ebbe30ce4c825630ca48ceb5eebccd4c33605b (diff) | |
download | FreeBSD-src-fb34cedca4713fc2c3bebe2336bbb1046e446f1a.zip FreeBSD-src-fb34cedca4713fc2c3bebe2336bbb1046e446f1a.tar.gz |
Use shared vnode locks for auditing vnode arguments as auditing only
does a VOP_GETATTR() which does not require an exclusive lock.
Reviewed by: csjp, rwatson
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_syscalls.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 4bdfc09..d30a94f 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -2734,7 +2734,7 @@ fchflags(td, uap) return (error); vfslocked = VFS_LOCK_GIANT(fp->f_vnode->v_mount); #ifdef AUDIT - vn_lock(fp->f_vnode, LK_EXCLUSIVE | LK_RETRY); + vn_lock(fp->f_vnode, LK_SHARED | LK_RETRY); AUDIT_ARG(vnode, fp->f_vnode, ARG_VNODE1); VOP_UNLOCK(fp->f_vnode, 0); #endif @@ -2896,7 +2896,7 @@ fchmod(td, uap) return (error); vfslocked = VFS_LOCK_GIANT(fp->f_vnode->v_mount); #ifdef AUDIT - vn_lock(fp->f_vnode, LK_EXCLUSIVE | LK_RETRY); + vn_lock(fp->f_vnode, LK_SHARED | LK_RETRY); AUDIT_ARG(vnode, fp->f_vnode, ARG_VNODE1); VOP_UNLOCK(fp->f_vnode, 0); #endif @@ -3074,7 +3074,7 @@ fchown(td, uap) return (error); vfslocked = VFS_LOCK_GIANT(fp->f_vnode->v_mount); #ifdef AUDIT - vn_lock(fp->f_vnode, LK_EXCLUSIVE | LK_RETRY); + vn_lock(fp->f_vnode, LK_SHARED | LK_RETRY); AUDIT_ARG(vnode, fp->f_vnode, ARG_VNODE1); VOP_UNLOCK(fp->f_vnode, 0); #endif @@ -3311,7 +3311,7 @@ kern_futimes(struct thread *td, int fd, struct timeval *tptr, return (error); vfslocked = VFS_LOCK_GIANT(fp->f_vnode->v_mount); #ifdef AUDIT - vn_lock(fp->f_vnode, LK_EXCLUSIVE | LK_RETRY); + vn_lock(fp->f_vnode, LK_SHARED | LK_RETRY); AUDIT_ARG(vnode, fp->f_vnode, ARG_VNODE1); VOP_UNLOCK(fp->f_vnode, 0); #endif |