summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Harmening <jah@FreeBSD.org>2020-04-04 04:03:10 +0000
committerJason A. Harmening <jah@FreeBSD.org>2020-04-04 04:03:10 +0000
commit407a5b7953aa64f0d16c5bfaf226de96d8959325 (patch)
tree75c6aa09fa99690e33a1551af6413d16da0ffd75
parent33ceb489d33e71b81adbd12bded321ad4486e42a (diff)
Notes
-rw-r--r--sys/security/mac/mac_framework.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c
index 8504b9dba203..91f4701737fe 100644
--- a/sys/security/mac/mac_framework.c
+++ b/sys/security/mac/mac_framework.c
@@ -184,7 +184,7 @@ MALLOC_DEFINE(M_MACTEMP, "mactemp", "MAC temporary label storage");
* The dynamic policy list is protected by two locks: modifying the list
* requires both locks to be held exclusively. One of the locks,
* mac_policy_rm, is acquired over policy entry points that will never sleep;
- * the other, mac_policy_sx, is acquire over policy entry points that may
+ * the other, mac_policy_rms, is acquired over policy entry points that may
* sleep. The former category will be used when kernel locks may be held
* over calls to the MAC Framework, during network processing in ithreads,
* etc. The latter will tend to involve potentially blocking memory
@@ -192,8 +192,7 @@ MALLOC_DEFINE(M_MACTEMP, "mactemp", "MAC temporary label storage");
*/
#ifndef MAC_STATIC
static struct rmlock mac_policy_rm; /* Non-sleeping entry points. */
-static struct sx mac_policy_sx; /* Sleeping entry points. */
-static struct rmslock mac_policy_rms;
+static struct rmslock mac_policy_rms; /* Sleeping entry points. */
#endif
struct mac_policy_list_head mac_policy_list;
@@ -266,7 +265,6 @@ mac_policy_xlock(void)
if (!mac_late)
return;
- sx_xlock(&mac_policy_sx);
rms_wlock(&mac_policy_rms);
rm_wlock(&mac_policy_rm);
#endif
@@ -282,7 +280,6 @@ mac_policy_xunlock(void)
rm_wunlock(&mac_policy_rm);
rms_wunlock(&mac_policy_rms);
- sx_xunlock(&mac_policy_sx);
#endif
}
@@ -294,8 +291,7 @@ mac_policy_xlock_assert(void)
if (!mac_late)
return;
- /* XXXRW: rm_assert(&mac_policy_rm, RA_WLOCKED); */
- sx_assert(&mac_policy_sx, SA_XLOCKED);
+ rm_assert(&mac_policy_rm, RA_WLOCKED);
#endif
}
@@ -313,7 +309,6 @@ mac_init(void)
#ifndef MAC_STATIC
rm_init_flags(&mac_policy_rm, "mac_policy_rm", RM_NOWITNESS |
RM_RECURSE);
- sx_init_flags(&mac_policy_sx, "mac_policy_sx", SX_NOWITNESS);
rms_init(&mac_policy_rms, "mac_policy_rms");
#endif
}