runc:format log instead panic when procError missing payload

This commit is contained in:
zhongjiawei 2024-08-30 15:57:57 +08:00
parent eaebb2951f
commit 5da2b9b8b4
4 changed files with 34 additions and 2 deletions

View File

@ -1 +1 @@
593dbd81f34d8d33d46906c17cb07c4011956cea b5df7029488e0b42b65b5df8e23c7bd9e8884099

View File

@ -0,0 +1,25 @@
From 46b7c30e013c15fc254a17e5151f05c99da6def4 Mon Sep 17 00:00:00 2001
From: zhongjiawei <zhongjiawei1@huawei.com>
Date: Fri, 30 Aug 2024 15:55:15 +0800
Subject: [PATCH] runc:format log instead panic when procError missing payload
---
libcontainer/sync.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcontainer/sync.go b/libcontainer/sync.go
index 25dc286..e6029fd 100644
--- a/libcontainer/sync.go
+++ b/libcontainer/sync.go
@@ -115,7 +115,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

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

View File

@ -40,3 +40,4 @@ patch/0040-add-loongarch64-seccomp-support.patch
patch/0041-runc-Set-temporary-single-CPU-affinity-before-cgroup-cpus.patch patch/0041-runc-Set-temporary-single-CPU-affinity-before-cgroup-cpus.patch
patch/0042-runc-fix-a-data-race.patch patch/0042-runc-fix-a-data-race.patch
patch/0043-runc-do-not-support-set-umask-through-native.umask.patch patch/0043-runc-do-not-support-set-umask-through-native.umask.patch
patch/0044-runc-format-log-instead-panic-when-procError-missing.patch