From owner-p4-projects@FreeBSD.ORG Wed Feb 23 11:46:31 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 81F6116A4D0; Wed, 23 Feb 2005 11:46:31 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5967D16A4CE for ; Wed, 23 Feb 2005 11:46:31 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 415B543D55 for ; Wed, 23 Feb 2005 11:46:31 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j1NBkVvU041724 for ; Wed, 23 Feb 2005 11:46:31 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j1NBkVsN041721 for perforce@freebsd.org; Wed, 23 Feb 2005 11:46:31 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 23 Feb 2005 11:46:31 GMT Message-Id: <200502231146.j1NBkVsN041721@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 71652 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Feb 2005 11:46:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=71652 Change 71652 by rwatson@rwatson_paprika on 2005/02/23 11:46:19 When replacing an existing mac_bsdextended rule, perform the replacement under the mac_bsdextended_mtx mutex so as not to race with other code using the rule pointer or rule. Affected files ... .. //depot/projects/trustedbsd/mac/sys/security/mac_bsdextended/mac_bsdextended.c#81 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/security/mac_bsdextended/mac_bsdextended.c#81 (text+ko) ==== @@ -186,10 +186,10 @@ rule_slots = index + 1; rule_count++; } else { + /* printf("replacement\n"); */ + *rules[index] = temprule; mtx_unlock(&mac_bsdextended_mtx); FREE(ruleptr, M_MACBSDEXTENDED); - /* printf("replacement\n"); */ - *rules[index] = temprule; } mtx_unlock(&mac_bsdextended_mtx); return (0);