runc/patch/0042-runc-fix-a-data-race.patch
2024-06-19 17:16:51 +08:00

27 lines
866 B
Diff

From d1ef3ab619c7743d389fc882ec65df38d140fc08 Mon Sep 17 00:00:00 2001
From: zhongjiawei <zhongjiawei1@huawei.com>
Date: Mon, 17 Jun 2024 23:22:39 +0800
Subject: [PATCH] libct/config: fix a data race
Reference:https://github.com/opencontainers/runc/commit/c342872276d4a3d5f662684115e282cbb20bf227
---
libcontainer/configs/config.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcontainer/configs/config.go b/libcontainer/configs/config.go
index f85ade3f..c9ecc3cb 100644
--- a/libcontainer/configs/config.go
+++ b/libcontainer/configs/config.go
@@ -455,7 +455,7 @@ func (c Command) Run(s *specs.State) error {
return err
case <-timerCh:
cmd.Process.Kill()
- cmd.Wait()
+ <-errC
return fmt.Errorf("hook ran past specified timeout of %.1fs", c.Timeout.Seconds())
case <-timeAfter:
if c.Timeout != nil {
--
2.33.0