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/security/audit | |
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/security/audit')
-rw-r--r-- | sys/security/audit/audit_arg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/security/audit/audit_arg.c b/sys/security/audit/audit_arg.c index e142b12..f938881 100644 --- a/sys/security/audit/audit_arg.c +++ b/sys/security/audit/audit_arg.c @@ -631,7 +631,7 @@ audit_arg_file(struct proc *p, struct file *fp) */ vp = fp->f_vnode; vfslocked = VFS_LOCK_GIANT(vp->v_mount); - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(vp, LK_SHARED | LK_RETRY); audit_arg_vnode(vp, ARG_VNODE1); VOP_UNLOCK(vp, 0); VFS_UNLOCK_GIANT(vfslocked); @@ -849,7 +849,7 @@ audit_sysclose(struct thread *td, int fd) vp = fp->f_vnode; vfslocked = VFS_LOCK_GIANT(vp->v_mount); - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(vp, LK_SHARED | LK_RETRY); audit_arg_vnode(vp, ARG_VNODE1); VOP_UNLOCK(vp, 0); VFS_UNLOCK_GIANT(vfslocked); |