Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Feb 2005 11:46:31 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 71652 for review
Message-ID:  <200502231146.j1NBkVsN041721@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502231146.j1NBkVsN041721>