Don't enter network epoch in tcp_usr_detach. A PCB removal doesn't

require that.
This commit is contained in:
Gleb Smirnoff 2020-01-22 06:04:56 +00:00
parent 5c722e2ad3
commit 5fc8df3c49
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=356980

View File

@ -214,7 +214,6 @@ tcp_detach(struct socket *so, struct inpcb *inp)
{
struct tcpcb *tp;
INP_INFO_LOCK_ASSERT(&V_tcbinfo);
INP_WLOCK_ASSERT(inp);
KASSERT(so->so_pcb == inp, ("tcp_detach: so_pcb != inp"));
@ -311,21 +310,13 @@ static void
tcp_usr_detach(struct socket *so)
{
struct inpcb *inp;
int rlock = 0;
struct epoch_tracker et;
inp = sotoinpcb(so);
KASSERT(inp != NULL, ("tcp_usr_detach: inp == NULL"));
if (!INP_INFO_WLOCKED(&V_tcbinfo)) {
NET_EPOCH_ENTER(et);
rlock = 1;
}
INP_WLOCK(inp);
KASSERT(inp->inp_socket != NULL,
("tcp_usr_detach: inp_socket == NULL"));
tcp_detach(so, inp);
if (rlock)
NET_EPOCH_EXIT(et);
}
#ifdef INET