git: 70e30addafe4 - main - tcp: remove extraneous network epoch entry
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Nov 2023 02:31:15 UTC
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=70e30addafe406e01db4a6643932b73082886241 commit 70e30addafe406e01db4a6643932b73082886241 Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2023-11-17 02:30:35 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2023-11-17 02:30:35 +0000 tcp: remove extraneous network epoch entry accept(2) on IPv6 TCP doesn't need epoch. Some leaf functions may need it, but they will enter accordingly, see sa6_recoverscope(). Reviewed by: rscheff, tuexen (implicitly, see deleted XXXMT) Differential Revision: https://reviews.freebsd.org/D42634 --- sys/netinet/tcp_usrreq.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 8b0b3c296c62..8e5ef0fd4bf7 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -767,17 +767,14 @@ tcp6_usr_accept(struct socket *so, struct sockaddr **nam) struct tcpcb *tp; struct in_addr addr; struct in6_addr addr6; - struct epoch_tracker et; in_port_t port = 0; int v4 = 0; inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp6_usr_accept: inp == NULL")); - NET_EPOCH_ENTER(et); /* XXXMT Why is this needed? */ INP_WLOCK(inp); if (inp->inp_flags & INP_DROPPED) { INP_WUNLOCK(inp); - NET_EPOCH_EXIT(et); return (ECONNABORTED); } tp = intotcpcb(inp); @@ -804,7 +801,6 @@ out: tcp_bblog_pru(tp, PRU_ACCEPT, error); TCP_PROBE2(debug__user, tp, PRU_ACCEPT); INP_WUNLOCK(inp); - NET_EPOCH_EXIT(et); if (error == 0) { if (v4) *nam = in6_v4mapsin6_sockaddr(port, &addr);