From owner-cvs-src@FreeBSD.ORG Sat Dec 25 22:44:05 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A91016A4CE; Sat, 25 Dec 2004 22:44:05 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2259543D1F; Sat, 25 Dec 2004 22:44:05 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBPMi5GR071357; Sat, 25 Dec 2004 22:44:05 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBPMi5TT071356; Sat, 25 Dec 2004 22:44:05 GMT (envelope-from rwatson) Message-Id: <200412252244.iBPMi5TT071356@repoman.freebsd.org> From: Robert Watson Date: Sat, 25 Dec 2004 22:44:05 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_5 Subject: cvs commit: src/sys/netinet tcp_input.c tcp_subr.c tcp_timer.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Dec 2004 22:44:05 -0000 rwatson 2004-12-25 22:44:04 UTC FreeBSD src repository Modified files: (Branch: RELENG_5) sys/netinet tcp_input.c tcp_subr.c tcp_timer.c Log: Merge tcp_input.c:1.257, tcp_subr.c:1.211, tcp_timer.c:1.69 from HEAD to RELENG_5: date: 2004/11/23 17:21:30; author: rwatson; state: Exp; lines: +4 -0 date: 2004/11/23 17:21:30; author: rwatson; state: Exp; lines: +2 -0 date: 2004/11/23 17:21:30; author: rwatson; state: Exp; lines: +9 -0 tcp_timewait() performs multiple non-atomic reads on the tcptw structure, so assert the inpcb lock associated with the tcptw. Also assert the tcbinfo lock, as tcp_timewait() may call tcp_twclose() or tcp_2msl_rest(), which require it. Since tcp_timewait() is already called with that lock from tcp_input(), this doesn't change current locking, merely documents reasons for it. In tcp_twstart(), assert the tcbinfo lock, as tcp_timer_2msl_rest() is called, which requires that lock. In tcp_twclose(), assert the tcbinfo lock, as tcp_timer_2msl_stop() is called, which requires that lock. Document the locking strategy for the time wait queues in tcp_timer.c, which consists of protecting the time wait queues in the same manner as the tcbinfo structure (using the tcbinfo lock). In tcp_timer_2msl_reset(), assert the tcbinfo lock, as the time wait queues are modified. In tcp_timer_2msl_stop(), assert the tcbinfo lock, as the time wait queues may be modified. In tcp_timer_2msl_tw(), assert the tcbinfo lock, as the time wait queues may be modified. MFC after: 2 weeks Revision Changes Path 1.252.2.6 +4 -0 src/sys/netinet/tcp_input.c 1.201.2.8 +2 -0 src/sys/netinet/tcp_subr.c 1.66.2.2 +9 -0 src/sys/netinet/tcp_timer.c