diff options
author | rwatson <rwatson@FreeBSD.org> | 2008-04-19 18:37:08 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2008-04-19 18:37:08 +0000 |
commit | c7094ab9ab7051337a2de22c0e040b81156fc7e3 (patch) | |
tree | b4362171a770515e2b21e7d469ea0c89543e40a5 /sys | |
parent | 1a186b0eb998e033d469368129a28142e8e59171 (diff) | |
download | FreeBSD-src-c7094ab9ab7051337a2de22c0e040b81156fc7e3.zip FreeBSD-src-c7094ab9ab7051337a2de22c0e040b81156fc7e3.tar.gz |
When auditing state from an IPv4 or IPv6 socket, use read locks on the
inpcb rather than write locks.
MFC after: 3 months
Diffstat (limited to 'sys')
-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 ffdfde6..939c7da 100644 --- a/sys/security/audit/audit_arg.c +++ b/sys/security/audit/audit_arg.c @@ -649,7 +649,7 @@ audit_arg_file(struct proc *p, struct file *fp) so->so_proto->pr_protocol; SOCK_UNLOCK(so); pcb = (struct inpcb *)so->so_pcb; - INP_WLOCK(pcb); + INP_RLOCK(pcb); ar->k_ar.ar_arg_sockinfo.so_raddr = pcb->inp_faddr.s_addr; ar->k_ar.ar_arg_sockinfo.so_laddr = @@ -658,7 +658,7 @@ audit_arg_file(struct proc *p, struct file *fp) pcb->inp_fport; ar->k_ar.ar_arg_sockinfo.so_lport = pcb->inp_lport; - INP_WUNLOCK(pcb); + INP_RUNLOCK(pcb); ARG_SET_VALID(ar, ARG_SOCKINFO); } break; |