diff options
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r-- | sys/netinet/in_pcb.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 26602cc..9dac3ec 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1003,6 +1003,7 @@ in_pcblookup_hash(struct inpcbinfo *pcbinfo, struct in_addr faddr, u_short fport = fport_arg, lport = lport_arg; INP_INFO_RLOCK_ASSERT(pcbinfo); + /* * First look for an exact match. */ @@ -1078,6 +1079,8 @@ in_pcbinshash(struct inpcb *inp) u_int32_t hashkey_faddr; INP_INFO_WLOCK_ASSERT(pcbinfo); + INP_LOCK_ASSERT(inp); + #ifdef INET6 if (inp->inp_vflag & INP_IPV6) hashkey_faddr = inp->in6p_faddr.s6_addr32[3] /* XXX */; @@ -1131,6 +1134,7 @@ in_pcbrehash(struct inpcb *inp) INP_INFO_WLOCK_ASSERT(pcbinfo); INP_LOCK_ASSERT(inp); + #ifdef INET6 if (inp->inp_vflag & INP_IPV6) hashkey_faddr = inp->in6p_faddr.s6_addr32[3] /* XXX */; @@ -1183,6 +1187,7 @@ in_pcbsosetlabel(struct socket *so) inp = sotoinpcb(so); KASSERT(inp != NULL, ("in_pcbsosetlabel: so->so_pcb == NULL")); + INP_LOCK(inp); SOCK_LOCK(so); mac_inpcb_sosetlabel(so, inp); |