runc:format log instead panic when procError missing payload

This commit is contained in:
zhongjiawei 2024-08-30 16:12:33 +08:00
parent 174e87f5a5
commit 9fa924efd7
3 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From c9928ac212fd6e436d8e528bc5e9d9fda3fe51d8 Mon Sep 17 00:00:00 2001
From: zhongjiawei <zhongjiawei1@huawei.com>
Date: Fri, 30 Aug 2024 16:10:28 +0800
Subject: [PATCH] runc:format log instead panic when procError missing payload
---
libcontainer/sync.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libcontainer/sync.go b/libcontainer/sync.go
index cf7b45b..9b5cd0d 100644
--- a/libcontainer/sync.go
+++ b/libcontainer/sync.go
@@ -2,6 +2,7 @@ package libcontainer
import (
"encoding/json"
+ "errors"
"fmt"
"io"
@@ -96,7 +97,7 @@ func parseSync(pipe io.Reader, fn func(*syncT) error) error {
return ierr
}
// Programmer error.
- panic("No error following JSON procError payload.")
+ return errors.New("procError missing error payload")
}
if err := fn(&sync); err != nil {
--
2.33.0

View File

@ -2,7 +2,7 @@
Name: docker-runc
Version: 1.0.0.rc3
Release: 226
Release: 227
Summary: runc is a CLI tool for spawning and running containers according to the OCI specification.
License: ASL 2.0
@ -41,6 +41,12 @@ install -p -m 755 runc $RPM_BUILD_ROOT/%{_bindir}/runc
%{_bindir}/runc
%changelog
* Fri Aug 30 2024 zhongjiawei<zhongjiawei1@huawei.com> - 1.0.0.rc3-227
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:format log instead panic when procError missing payload
* Thu Jul 11 2024 zhongjiawei<zhongjiawei1@huawei.com> - 1.0.0.rc3-226
- Type:bugfix
- CVE:NA

View File

@ -144,3 +144,4 @@
0150-runc-Fix-File-to-Close.patch
0151-runc-Fix-tmpfs-mode-opts-when-dir-already-exis.patch
0152-runc-do-not-support-set-umask-through-native.umask.patch
0153-runc-format-log-instead-panic-when-procError-missing.patch