From c525feeca120290a3011e2d8bcbf4df5ba756cfe Mon Sep 17 00:00:00 2001 From: zhongjiawei Date: Tue, 16 Aug 2022 20:05:51 +0800 Subject: [PATCH] runc: fix systemd cgroup after memory type changed --- ...emd-cgroup-after-memory-type-changed.patch | 30 +++++++++++++++++++ runc-openeuler.spec | 8 ++++- series.conf | 1 + 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 patch/0132-runc-fix-systemd-cgroup-after-memory-type-changed.patch diff --git a/patch/0132-runc-fix-systemd-cgroup-after-memory-type-changed.patch b/patch/0132-runc-fix-systemd-cgroup-after-memory-type-changed.patch new file mode 100644 index 0000000..3629b8d --- /dev/null +++ b/patch/0132-runc-fix-systemd-cgroup-after-memory-type-changed.patch @@ -0,0 +1,30 @@ +From 22fab107bdb684d3e7651804b5f6ba3c432652ca Mon Sep 17 00:00:00 2001 +From: xiadanni +Date: Mon, 9 Aug 2021 10:16:47 +0800 +Subject: [PATCH] runc:fix systemd cgroup after memory type changed + +upstream from +https://github.com/opencontainers/runc/pull/1573/commits/acaf6897f566c2f592a488c83dafcddec41524be + +Signed-off-by: Qiang Huang +Signed-off-by: xiadanni +--- + libcontainer/cgroups/systemd/apply_systemd.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libcontainer/cgroups/systemd/apply_systemd.go b/libcontainer/cgroups/systemd/apply_systemd.go +index 0411b72..a08a9a9 100644 +--- a/libcontainer/cgroups/systemd/apply_systemd.go ++++ b/libcontainer/cgroups/systemd/apply_systemd.go +@@ -261,7 +261,7 @@ func (m *Manager) Apply(pid int) error { + + if c.Resources.Memory != 0 { + properties = append(properties, +- newProp("MemoryLimit", c.Resources.Memory)) ++ newProp("MemoryLimit", uint64(c.Resources.Memory))) + } + + if c.Resources.CpuShares != 0 { +-- +2.27.0 + diff --git a/runc-openeuler.spec b/runc-openeuler.spec index aa3f011..5325fd0 100644 --- a/runc-openeuler.spec +++ b/runc-openeuler.spec @@ -4,7 +4,7 @@ Name: docker-runc Version: 1.0.0.rc3 -Release: 302 +Release: 303 Summary: runc is a CLI tool for spawning and running containers according to the OCI specification. License: ASL 2.0 @@ -53,6 +53,12 @@ install -p -m 755 runc $RPM_BUILD_ROOT/%{_bindir}/runc %{_bindir}/runc %changelog +* Tue Aug 16 2022 zhongjiawei - 1.0.0.rc3-303 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix systemd cgroup after memory type changed + * Tue Aug 9 2022 zhongjiawei - 1.0.0.rc3-302 - Type:bugfix - CVE:NA diff --git a/series.conf b/series.conf index 57c50e2..de96a2b 100644 --- a/series.conf +++ b/series.conf @@ -130,4 +130,5 @@ patch/0129-runc-improve-log-for-debugging.patch patch/0130-runc-fix-cgroup-info-print-error.patch patch/0128-runc-fix-CVE-2022-29162.patch patch/0131-runc-change-Umask-to-0022.patch +patch/0132-runc-fix-systemd-cgroup-after-memory-type-changed.patch #end -- Gitee