From owner-cvs-all@FreeBSD.ORG Sat Dec 30 16:03:44 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A385F16A403; Sat, 30 Dec 2006 16:03:44 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 95B0913C489; Sat, 30 Dec 2006 16:03:44 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kBUG3iPA078185; Sat, 30 Dec 2006 16:03:44 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kBUG3iRp078184; Sat, 30 Dec 2006 16:03:44 GMT (envelope-from rwatson) Message-Id: <200612301603.kBUG3iRp078184@repoman.freebsd.org> From: Robert Watson Date: Sat, 30 Dec 2006 16:03:44 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_6 Cc: Subject: cvs commit: src/sys/netinet tcp_subr.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 16:03:44 -0000 rwatson 2006-12-30 16:03:44 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) sys/netinet tcp_subr.c Log: Merge tcp_subr.c:1.251 from HEAD to RELENG_6: Fix race conditions on enumerating pcb lists by moving the initialization (and where appropriate the destruction) of the pcb mutex to the init/finit functions of the pcb zones. This allows locking of the pcb entries and race condition free comparison of the generation count. Rearrange locking a bit to avoid extra locking operation to update the generation count in in_pcballoc(). (in_pcballoc now returns the pcb locked) I am planning to convert pcb list handling from a type safe to a reference count model soon. (As this allows really freeing the PCBs) Reviewed by: rwatson, mohans This was missed in jhb's earlier MFC, and lead to a panic when creating TCP sockets. Reported by: Larry Rosenman Henrik Brix Andersen Karol Kwiatkowski Danny Braniss Torfinn Ingolfsen Revision Changes Path 1.228.2.13 +14 -2 src/sys/netinet/tcp_subr.c