From 76969aa8015c6a1bd2b1d5da2ff0bda31e101e99 Mon Sep 17 00:00:00 2001 From: Brian Kassouf Date: Tue, 9 Apr 2019 19:20:06 -0700 Subject: [PATCH] Fix deadlock on the mounts & auth locks (#6560) * Fix deadlock on the mountsLock * Fix deadlock on authLock too --- vault/logical_system.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vault/logical_system.go b/vault/logical_system.go index 842b5f4cd..0659372aa 100644 --- a/vault/logical_system.go +++ b/vault/logical_system.go @@ -2913,6 +2913,7 @@ func (b *SystemBackend) pathInternalUIMountsRead(ctx context.Context, req *logic for _, entry := range b.Core.mounts.Entries { filtered, err := b.Core.checkReplicatedFiltering(ctx, entry, "") if err != nil { + b.Core.mountsLock.RUnlock() return nil, err } if filtered { @@ -2938,6 +2939,7 @@ func (b *SystemBackend) pathInternalUIMountsRead(ctx context.Context, req *logic for _, entry := range b.Core.auth.Entries { filtered, err := b.Core.checkReplicatedFiltering(ctx, entry, credentialRoutePrefix) if err != nil { + b.Core.authLock.RUnlock() return nil, err } if filtered {