summaryrefslogtreecommitdiffhomepage
path: root/util/syspolicy/rsop/rsop.go
diff options
context:
space:
mode:
Diffstat (limited to 'util/syspolicy/rsop/rsop.go')
-rw-r--r--util/syspolicy/rsop/rsop.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/util/syspolicy/rsop/rsop.go b/util/syspolicy/rsop/rsop.go
index 333dca643..d7e50a004 100644
--- a/util/syspolicy/rsop/rsop.go
+++ b/util/syspolicy/rsop/rsop.go
@@ -32,6 +32,11 @@ var (
effectivePolicyLRU [setting.NumScopes]syncs.AtomicValue[*Policy]
)
+var _ = func() bool {
+ syncs.RegisterMutex(&policyMu, "syspolicy/rsop.policyMu")
+ return true
+}()
+
// PolicyFor returns the [Policy] for the specified scope,
// creating it from the registered [source.Store]s if it doesn't already exist.
func PolicyFor(scope setting.PolicyScope) (*Policy, error) {