The branch main has been updated by glebius:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=20162e6f1c176c906c6d9d99fc66f6b0ed37dc05

commit 20162e6f1c176c906c6d9d99fc66f6b0ed37dc05
Author:     Gleb Smirnoff <gleb...@freebsd.org>
AuthorDate: 2024-11-14 19:39:12 +0000
Commit:     Gleb Smirnoff <gleb...@freebsd.org>
CommitDate: 2024-11-14 19:39:12 +0000

    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);
 }

Reply via email to