From e7b4fc2ce640d642fac9939fabbd9a30e281bfe8 Mon Sep 17 00:00:00 2001 From: Ryan Fredette Date: Tue, 17 Sep 2024 11:39:08 -0400 Subject: [PATCH] Be explicit about crlsMutex's use Co-authored-by: Miciah Dashiel Butler Masters --- pkg/router/crl/crl.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/router/crl/crl.go b/pkg/router/crl/crl.go index 767f3aa93..bbfc5bfb4 100644 --- a/pkg/router/crl/crl.go +++ b/pkg/router/crl/crl.go @@ -68,8 +68,10 @@ var ( // CABundleFilename is the fully qualified path to the currently in use CA bundle. CABundleFilename = filepath.Join(mtlsLatestSymlink, caBundleBasename) // crlsUpdated is true when all CRLs have been successfully updated, and false when there are missing CRLs. + // You must take crlsMutex before using crlsUpdated. crlsUpdated = false - crlsMutex = sync.Mutex{} + // crlsMutex protects crlsUpdated. + crlsMutex = sync.Mutex{} ) // authorityKeyIdentifier is a certificate's authority key identifier.