summaryrefslogtreecommitdiff
path: root/libpod/rootless_cni_linux.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-01-14 13:37:16 -0500
committerGitHub <noreply@github.com>2021-01-14 13:37:16 -0500
commita1b49749af97c5a3b6256b5aa0f53897257bc838 (patch)
tree3aa0413a7fabc7faff920018b66dae54bc86120e /libpod/rootless_cni_linux.go
parente0211a14fc58657821a2af92d09f115470a38c36 (diff)
parentd54478d8eaec9481d482942b87065af36995d39a (diff)
downloadpodman-a1b49749af97c5a3b6256b5aa0f53897257bc838.tar.gz
podman-a1b49749af97c5a3b6256b5aa0f53897257bc838.tar.bz2
podman-a1b49749af97c5a3b6256b5aa0f53897257bc838.zip
Merge pull request #8906 from vrothberg/fix-8501
container stop: release lock before calling the runtime
Diffstat (limited to 'libpod/rootless_cni_linux.go')
-rw-r--r--libpod/rootless_cni_linux.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/rootless_cni_linux.go b/libpod/rootless_cni_linux.go
index ce8a87759..9a980750f 100644
--- a/libpod/rootless_cni_linux.go
+++ b/libpod/rootless_cni_linux.go
@@ -110,6 +110,8 @@ func DeallocRootlessCNI(ctx context.Context, c *Container) error {
logrus.Warn(err)
}
logrus.Debugf("rootless CNI: removing infra container %q", infra.ID())
+ infra.lock.Lock()
+ defer infra.lock.Unlock()
if err := c.runtime.removeContainer(ctx, infra, true, false, true); err != nil {
return err
}