From owner-svn-src-head@FreeBSD.ORG Tue Jun 2 22:22:10 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15B0E1065696; Tue, 2 Jun 2009 22:22:10 +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 0347D8FC2B; Tue, 2 Jun 2009 22:22:10 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n52MM989030080; Tue, 2 Jun 2009 22:22:09 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n52MM96x030079; Tue, 2 Jun 2009 22:22:09 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200906022222.n52MM96x030079@svn.freebsd.org> From: Robert Watson Date: Tue, 2 Jun 2009 22:22:09 +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: r193355 - head/sys/security/mac 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: Tue, 02 Jun 2009 22:22:11 -0000 Author: rwatson Date: Tue Jun 2 22:22:09 2009 New Revision: 193355 URL: http://svn.freebsd.org/changeset/base/193355 Log: Mark MAC Framework sx and rm locks as NOWITNESS to suppress warnings that might arise from WITNESS not understanding its locking protocol, which should be deadlock-free. Currently these warnings generally don't occur, but as object locking is pushed into policies for some object types, they would otherwise occur more often. Obtained from: TrustedBSD Project Modified: head/sys/security/mac/mac_framework.c Modified: head/sys/security/mac/mac_framework.c ============================================================================== --- head/sys/security/mac/mac_framework.c Tue Jun 2 22:15:47 2009 (r193354) +++ head/sys/security/mac/mac_framework.c Tue Jun 2 22:22:09 2009 (r193355) @@ -290,8 +290,8 @@ mac_init(void) mac_labelzone_init(); #ifndef MAC_STATIC - rm_init(&mac_policy_rm, "mac_policy_rm"); - sx_init(&mac_policy_sx, "mac_policy_sx"); + rm_init_flags(&mac_policy_rm, "mac_policy_rm", RM_NOWITNESS); + sx_init_flags(&mac_policy_sx, "mac_policy_sx", SX_NOWITNESS); #endif }