From owner-svn-src-head@FreeBSD.ORG Sun Jul 22 17:31:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9ED32106564A; Sun, 22 Jul 2012 17:31:37 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A21B8FC08; Sun, 22 Jul 2012 17:31:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6MHVbWx009026; Sun, 22 Jul 2012 17:31:37 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6MHVbxN009024; Sun, 22 Jul 2012 17:31:37 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201207221731.q6MHVbxN009024@svn.freebsd.org> From: Robert Watson Date: Sun, 22 Jul 2012 17:31:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238699 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jul 2012 17:31:37 -0000 Author: rwatson Date: Sun Jul 22 17:31:36 2012 New Revision: 238699 URL: http://svn.freebsd.org/changeset/base/238699 Log: Update some stale comments regarding tcbinfo locking in the TCP input path: read locks on tcbinfo are no longer used, so won't happen. No functional change. MFC after: 3 days Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Sun Jul 22 16:56:59 2012 (r238698) +++ head/sys/netinet/tcp_input.c Sun Jul 22 17:31:36 2012 (r238699) @@ -909,7 +909,7 @@ findpcb: /* * A previous connection in TIMEWAIT state is supposed to catch stray * or duplicate segments arriving late. If this segment was a - * legitimate new connection attempt the old INPCB gets removed and + * 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 @@ -1438,15 +1438,8 @@ tcp_do_segment(struct mbuf *m, struct tc /* * If this is either a state-changing packet or current state isn't * established, we require a write lock on tcbinfo. Otherwise, we - * allow either a read lock or a write lock, as we may have acquired - * a write lock due to a race. - * - * Require a global write lock for SYN/FIN/RST segments or - * non-established connections; otherwise accept either a read or - * write lock, as we may have conservatively acquired a write lock in - * certain cases in tcp_input() (is this still true?). Currently we - * will never enter with no lock, so we try to drop it quickly in the - * common pure ack/pure data cases. + * allow the tcbinfo to be in either alocked or unlocked, as the + * caller may have unnecessarily acquired a write lock due to a race. */ if ((thflags & (TH_SYN | TH_FIN | TH_RST)) != 0 || tp->t_state != TCPS_ESTABLISHED) {