summaryrefslogtreecommitdiffstats
path: root/sys/security/mac
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2009-06-02 22:22:09 +0000
committerrwatson <rwatson@FreeBSD.org>2009-06-02 22:22:09 +0000
commitfbef62df46e1f6848129dff9ea3b2edee6b2d693 (patch)
tree2da596cb79f90356666cc8038fcdb874588f08dc /sys/security/mac
parent0bff7488fb988a9a6e62cddf177ad456bfd43aaf (diff)
downloadFreeBSD-src-fbef62df46e1f6848129dff9ea3b2edee6b2d693.zip
FreeBSD-src-fbef62df46e1f6848129dff9ea3b2edee6b2d693.tar.gz
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
Diffstat (limited to 'sys/security/mac')
-rw-r--r--sys/security/mac/mac_framework.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c
index 3d2a139..1f43c02 100644
--- a/sys/security/mac/mac_framework.c
+++ b/sys/security/mac/mac_framework.c
@@ -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
}
OpenPOWER on IntegriCloud