aboutsummaryrefslogtreecommitdiff
path: root/sys/security
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2008-04-17 21:38:18 +0000
committerRobert Watson <rwatson@FreeBSD.org>2008-04-17 21:38:18 +0000
commit8501a69cc940a7d32d9299da26baf0b1863e0fa9 (patch)
treefd64d5b5062ffc1979994100cac82014c5ed48b6 /sys/security
parentf55f27f862c84942615b61c67112fe5b9b7411f7 (diff)
Notes
Diffstat (limited to 'sys/security')
-rw-r--r--sys/security/audit/audit_arg.c4
-rw-r--r--sys/security/mac/mac_inet.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/security/audit/audit_arg.c b/sys/security/audit/audit_arg.c
index 309b90d46dbbb..ffdfde6c19094 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_LOCK(pcb);
+ INP_WLOCK(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_UNLOCK(pcb);
+ INP_WUNLOCK(pcb);
ARG_SET_VALID(ar, ARG_SOCKINFO);
}
break;
diff --git a/sys/security/mac/mac_inet.c b/sys/security/mac/mac_inet.c
index 6533cf0927cbf..0445d915a82e7 100644
--- a/sys/security/mac/mac_inet.c
+++ b/sys/security/mac/mac_inet.c
@@ -201,7 +201,7 @@ mac_inpcb_create_mbuf(struct inpcb *inp, struct mbuf *m)
{
struct label *mlabel;
- INP_LOCK_ASSERT(inp);
+ INP_WLOCK_ASSERT(inp);
mlabel = mac_mbuf_to_label(m);
MAC_PERFORM(inpcb_create_mbuf, inp, inp->inp_label, m, mlabel);
@@ -306,7 +306,7 @@ void
mac_inpcb_sosetlabel(struct socket *so, struct inpcb *inp)
{
- INP_LOCK_ASSERT(inp);
+ INP_WLOCK_ASSERT(inp);
SOCK_LOCK_ASSERT(so);
MAC_PERFORM(inpcb_sosetlabel, so, so->so_label, inp, inp->inp_label);
}
@@ -376,7 +376,7 @@ void
mac_syncache_create(struct label *label, struct inpcb *inp)
{
- INP_LOCK_ASSERT(inp);
+ INP_WLOCK_ASSERT(inp);
MAC_PERFORM(syncache_create, label, inp);
}