summaryrefslogtreecommitdiffstats
path: root/sys/contrib/pf/net/pf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/pf/net/pf.c')
-rw-r--r--sys/contrib/pf/net/pf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/contrib/pf/net/pf.c b/sys/contrib/pf/net/pf.c
index 69a7de5..69fe3de 100644
--- a/sys/contrib/pf/net/pf.c
+++ b/sys/contrib/pf/net/pf.c
@@ -2915,7 +2915,7 @@ pf_socket_lookup(int direction, struct pf_pdesc *pd)
pd->lookup.pid = NO_PID; /* XXX: revisit */
#ifdef __FreeBSD__
if (inp_arg != NULL) {
- INP_LOCK_ASSERT(inp_arg);
+ INP_WLOCK_ASSERT(inp_arg);
if (inp_arg->inp_socket) {
pd->lookup.uid = inp_arg->inp_socket->so_cred->cr_uid;
pd->lookup.gid =
@@ -3018,15 +3018,15 @@ pf_socket_lookup(int direction, struct pf_pdesc *pd)
return (-1);
}
#ifdef __FreeBSD__
- INP_LOCK(inp);
+ INP_WLOCK(inp);
if ((inp->inp_socket == NULL) || (inp->inp_socket->so_cred == NULL)) {
- INP_UNLOCK(inp);
+ INP_WUNLOCK(inp);
INP_INFO_RUNLOCK(pi);
return (-1);
}
pd->lookup.uid = inp->inp_socket->so_cred->cr_uid;
pd->lookup.gid = inp->inp_socket->so_cred->cr_groups[0];
- INP_UNLOCK(inp);
+ INP_WUNLOCK(inp);
INP_INFO_RUNLOCK(pi);
#else
pd->lookup.uid = inp->inp_socket->so_euid;
OpenPOWER on IntegriCloud