From owner-cvs-src@FreeBSD.ORG Fri Nov 25 14:26:40 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org 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 D435516A41F; Fri, 25 Nov 2005 14:26:40 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CADD43D4C; Fri, 25 Nov 2005 14:26:40 +0000 (GMT) (envelope-from glebius@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 jAPEQeGk021893; Fri, 25 Nov 2005 14:26:40 GMT (envelope-from glebius@repoman.freebsd.org) Received: (from glebius@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jAPEQeX6021892; Fri, 25 Nov 2005 14:26:40 GMT (envelope-from glebius) Message-Id: <200511251426.jAPEQeX6021892@repoman.freebsd.org> From: Gleb Smirnoff Date: Fri, 25 Nov 2005 14:26:40 +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/netgraph ng_socket.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 25 Nov 2005 14:26:41 -0000 glebius 2005-11-25 14:26:40 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) sys/netgraph ng_socket.c Log: MFC 1.70: Fix several races between socket closure and node/hook destruction: - Backout 1.62, since it doesn't fix all possible problems. - Upon node creation, put an additional reference on node. - Add a mutex and refcounter to struct ngsock. Netgraph node, control socket and data socket all count as references. - Introduce ng_socket_free_priv() which removes one reference from ngsock, and frees it when all references has gone. - No direct pointers between pcbs and node, all pointing is done via struct ngsock and protected with mutex. Revision Changes Path 1.67.2.4 +100 -80 src/sys/netgraph/ng_socket.c