diff --git a/sys/security/audit/audit_arg.c b/sys/security/audit/audit_arg.c index ffdfde6c1909..939c7da66489 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;