Date: Wed, 22 Jan 2020 06:04:56 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r356980 - head/sys/netinet Message-ID: <202001220604.00M64u7q033030@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Wed Jan 22 06:04:56 2020 New Revision: 356980 URL: https://svnweb.freebsd.org/changeset/base/356980 Log: Don't enter network epoch in tcp_usr_detach. A PCB removal doesn't require that. Modified: head/sys/netinet/tcp_usrreq.c Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Wed Jan 22 06:03:45 2020 (r356979) +++ head/sys/netinet/tcp_usrreq.c Wed Jan 22 06:04:56 2020 (r356980) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001220604.00M64u7q033030>