diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2024-12-05 16:38:22 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2024-12-05 16:45:26 +0000 |
| commit | ffb3d384fc1d550a764def2c0cd034ac3a4f0b86 (patch) | |
| tree | fd5ddfaa77a629212b18e7effa123aa51f57026e | |
| parent | 61bf830cbb260c2a046cb44421d319184393e028 (diff) | |
inpcb: Fix the GENERIC-NODEBUG build
Fixes: 01f8ce83242d ("inpcb: Factor out parts of in6_pcbbind() and in_pcbbind_setup()")
| -rw-r--r-- | sys/netinet/in_pcb.c | 3 | ||||
| -rw-r--r-- | sys/netinet6/in6_pcb.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 94fb406bcd2b..1309d19121cd 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -962,7 +962,6 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr_in *sin, in_addr_t *laddrp, u_short *lportp, struct ucred *cred) { struct socket *so = inp->inp_socket; - struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; struct in_addr laddr; u_short lport = 0; int lookupflags, sooptions; @@ -972,7 +971,7 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr_in *sin, in_addr_t *laddrp, * No state changes, so read locks are sufficient here. */ INP_LOCK_ASSERT(inp); - INP_HASH_LOCK_ASSERT(pcbinfo); + INP_HASH_LOCK_ASSERT(inp->inp_pcbinfo); laddr.s_addr = *laddrp; if (sin != NULL && laddr.s_addr != INADDR_ANY) diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 6b5a9d3706be..4f7c0912e675 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -298,12 +298,11 @@ int in6_pcbbind(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred) { struct socket *so = inp->inp_socket; - struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; u_short lport = 0; int error, lookupflags, sooptions; INP_WLOCK_ASSERT(inp); - INP_HASH_WLOCK_ASSERT(pcbinfo); + INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); if (inp->inp_lport || !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) return (EINVAL); |
