From owner-cvs-all@FreeBSD.ORG Wed Dec 22 09:38:10 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DC7E16A4CE; Wed, 22 Dec 2004 09:38:10 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A9BE43D4C; Wed, 22 Dec 2004 09:38:10 +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 iBM9cAAS032062; Wed, 22 Dec 2004 09:38:10 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBM9cAfe032061; Wed, 22 Dec 2004 09:38:10 GMT (envelope-from rwatson) Message-Id: <200412220938.iBM9cAfe032061@repoman.freebsd.org> From: Robert Watson Date: Wed, 22 Dec 2004 09:38:10 +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/security/mac_portacl mac_portacl.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 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: Wed, 22 Dec 2004 09:38:10 -0000 rwatson 2004-12-22 09:38:10 UTC FreeBSD src repository Modified files: (Branch: RELENG_5) sys/security/mac_portacl mac_portacl.c Log: Merge mac_portacl.c:1.5 from HEAD to RELENG_5: date: 2004/12/06 19:43:45; author: rwatson; state: Exp; lines: +19 -26 Switch from using an sx lock to a mutex for the mac_portacl rule chain: the sx lock was used previously because we might sleep allocating additional memory by using auto-extending sbufs. However, we no longer do this, instead retaining the user-submitted rule string, so mutexes can be used instead. Annotate the reason for not using the sbuf-related rule-to-string code with a comment. Switch to using TAILQ_CONCAT() instead of manual list copying, as it's O(1), reducing the rule replacement step under the mutex from O(2N) to O(2). Remove now uneeded vnode-related includes. MFC after: 2 weeks Revision Changes Path 1.5.2.1 +19 -26 src/sys/security/mac_portacl/mac_portacl.c