The branch main has been updated by glebius:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=7b5053ce2296e0fd96f162e308beb344b4ee654c

commit 7b5053ce2296e0fd96f162e308beb344b4ee654c
Author:     Gleb Smirnoff <[email protected]>
AuthorDate: 2021-04-16 21:39:19 +0000
Commit:     Gleb Smirnoff <[email protected]>
CommitDate: 2021-04-20 17:02:20 +0000

    tcp_input: remove comments and assertions about tcpbinfo locking
    
    They aren't valid since d40c0d47cd2.
---
 sys/netinet/tcp_input.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 8592f3313725..cac67024705e 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -984,16 +984,6 @@ findpcb:
         * or duplicate segments arriving late.  If this segment was a
         * legitimate new connection attempt, the old INPCB gets removed and
         * we can try again to find a listening socket.
-        *
-        * At this point, due to earlier optimism, we may hold only an inpcb
-        * lock, and not the inpcbinfo write lock.  If so, we need to try to
-        * acquire it, or if that fails, acquire a reference on the inpcb,
-        * drop all locks, acquire a global write lock, and then re-acquire
-        * the inpcb lock.  We may at that point discover that another thread
-        * has tried to free the inpcb, in which case we need to loop back
-        * and try to find a new inpcb to deliver to.
-        *
-        * XXXRW: It may be time to rethink timewait locking.
         */
        if (inp->inp_flags & INP_TIMEWAIT) {
                tcp_dooptions(&to, optp, optlen,
@@ -1361,7 +1351,6 @@ tfo_socket_result:
                 * Entry added to syncache and mbuf consumed.
                 * Only the listen socket is unlocked by syncache_add().
                 */
-               INP_INFO_WUNLOCK_ASSERT(&V_tcbinfo);
                return (IPPROTO_DONE);
        } else if (tp->t_state == TCPS_LISTEN) {
                /*
@@ -1414,7 +1403,6 @@ dropunlock:
                INP_UNLOCK(inp);
 
 drop:
-       INP_INFO_WUNLOCK_ASSERT(&V_tcbinfo);
        if (s != NULL)
                free(s, M_TCPLOG);
        if (m != NULL)
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "[email protected]"

Reply via email to