Index: sys/security/mac/mac_framework.c =================================================================== --- sys/security/mac/mac_framework.c +++ sys/security/mac/mac_framework.c @@ -184,7 +184,7 @@ * 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 @@ */ #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 @@ if (!mac_late) return; - sx_xlock(&mac_policy_sx); rms_wlock(&mac_policy_rms); rm_wlock(&mac_policy_rm); #endif @@ -282,7 +280,6 @@ rm_wunlock(&mac_policy_rm); rms_wunlock(&mac_policy_rms); - sx_xunlock(&mac_policy_sx); #endif } @@ -294,8 +291,7 @@ 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 @@ #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 }