tcp: Remove a redundant net_epoch entry in tcp6_connect()

tcp6_connect() is always called in a net_epoch read section.

Fixes:		3d76be28ec ("netinet6: require network epoch for in6_pcbconnect()")
Reviewed by:	tuexen, glebius
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D38506
This commit is contained in:
Mark Johnston 2023-02-13 16:21:10 -05:00
parent 18bb97b76b
commit 775da7f8a9

View file

@ -1433,16 +1433,14 @@ static int
tcp6_connect(struct tcpcb *tp, struct sockaddr_in6 *sin6, struct thread *td)
{
struct inpcb *inp = tptoinpcb(tp);
struct epoch_tracker et;
int error;
NET_EPOCH_ASSERT();
INP_WLOCK_ASSERT(inp);
NET_EPOCH_ENTER(et);
INP_HASH_WLOCK(&V_tcbinfo);
error = in6_pcbconnect(inp, sin6, td->td_ucred, true);
INP_HASH_WUNLOCK(&V_tcbinfo);
NET_EPOCH_EXIT(et);
if (error != 0)
return (error);