When auditing state from an IPv4 or IPv6 socket, use read locks on the
inpcb rather than write locks. MFC after: 3 months
This commit is contained in:
parent
211b72ad2f
commit
1a46aa801e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user