From 20162e6f1c176c906c6d9d99fc66f6b0ed37dc05 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Thu, 14 Nov 2024 11:39:12 -0800 Subject: [PATCH] rip6: don't lock the inpcb list There is no point in doing that when we operate on a particular inpcb. --- sys/netinet6/raw_ip6.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index b4421509ec62..8f1955164928 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -766,9 +766,7 @@ rip6_bind(struct socket *so, struct sockaddr *nam, struct thread *td) } NET_EPOCH_EXIT(et); INP_WLOCK(inp); - INP_INFO_WLOCK(&V_ripcbinfo); inp->in6p_laddr = addr->sin6_addr; - INP_INFO_WUNLOCK(&V_ripcbinfo); INP_WUNLOCK(inp); return (0); } @@ -806,14 +804,12 @@ rip6_connect(struct socket *so, struct sockaddr *nam, struct thread *td) return (error); INP_WLOCK(inp); - INP_INFO_WLOCK(&V_ripcbinfo); /* Source address selection. XXX: need pcblookup? */ NET_EPOCH_ENTER(et); error = in6_selectsrc_socket(addr, inp->in6p_outputopts, inp, so->so_cred, scope_ambiguous, &in6a, NULL); NET_EPOCH_EXIT(et); if (error) { - INP_INFO_WUNLOCK(&V_ripcbinfo); INP_WUNLOCK(inp); return (error); } @@ -821,7 +817,6 @@ rip6_connect(struct socket *so, struct sockaddr *nam, struct thread *td) inp->in6p_faddr = addr->sin6_addr; inp->in6p_laddr = in6a; soisconnected(so); - INP_INFO_WUNLOCK(&V_ripcbinfo); INP_WUNLOCK(inp); return (0); }