diff --git a/0040-continue-cgroup-deletion-when-errors-occur.patch b/0040-continue-cgroup-deletion-when-errors-occur.patch new file mode 100644 index 0000000000000000000000000000000000000000..cd1aab1205885cd28c572ed89f565f30c55ed76f --- /dev/null +++ b/0040-continue-cgroup-deletion-when-errors-occur.patch @@ -0,0 +1,42 @@ +From aafd52c8be2ae5c9f2641c407fb5640f2955e5f5 Mon Sep 17 00:00:00 2001 +From: vegbir +Date: Tue, 12 Apr 2022 15:30:38 +0800 +Subject: [PATCH] continue cgroup deletion when errors occur + +--- + src/lxc/cgroups/isulad_cgfsng.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/lxc/cgroups/isulad_cgfsng.c b/src/lxc/cgroups/isulad_cgfsng.c +index 576b424..45c9630 100644 +--- a/src/lxc/cgroups/isulad_cgfsng.c ++++ b/src/lxc/cgroups/isulad_cgfsng.c +@@ -623,7 +623,8 @@ static int isulad_cgroup_tree_remove(struct hierarchy **hierarchies, + { + if (!container_cgroup || !hierarchies) + return 0; +- ++ ++ int fret = 0; + for (int i = 0; hierarchies[i]; i++) { + struct hierarchy *h = hierarchies[i]; + int ret; +@@ -635,13 +636,13 @@ static int isulad_cgroup_tree_remove(struct hierarchy **hierarchies, + ret = lxc_rm_rf(h->container_full_path); + if (ret < 0) { + SYSERROR("Failed to destroy \"%s\"", h->container_full_path); +- return -1; ++ fret = -1; + } + + free_disarm(h->container_full_path); + } + +- return 0; ++ return fret; + } + + static int isulad_cgroup_tree_remove_wrapper(void *data) +-- +2.32.0 (Apple Git-132) + diff --git a/lxc.spec b/lxc.spec index c7de1c8ce878ac6f4d628b58f790874f2b673727..35db5f38ab2ac4f2e0cedd2a1a96385f50633083 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 2022040901 +%global _release 2022041201 Name: lxc Version: 4.0.3 @@ -47,6 +47,7 @@ Patch0036: 0036-compile-in-android-env.patch Patch0037: 0037-fix-always-print-and-temp-len.patch Patch0038: 0038-just-print-error-when-new-lock-failed.patch Patch0039: 0039-fix-bug-of-memory-free.patch +Patch0040: 0040-continue-cgroup-deletion-when-errors-occur.patch BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath BuildRequires: pkgconfig(libseccomp) @@ -218,6 +219,12 @@ make check %{_mandir}/*/man7/%{name}* %changelog +* Tue Apr 12 2022 yangjiaqi - 4.0.3-2022041201 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: continue cgroup deletion when errors occur + * Sat Apr 09 2022 wujing - 4.0.3-2022040901 - Type:bugfix - ID:NA diff --git a/series.conf b/series.conf index 9e9f9c2504a3a59e1e2ca5c708613ee6179cce6f..3e27bc14d27a84994487e5be10963c91afe5e0b8 100644 --- a/series.conf +++ b/series.conf @@ -37,3 +37,4 @@ 0037-fix-always-print-and-temp-len.patch 0038-just-print-error-when-new-lock-failed.patch 0039-fix-bug-of-memory-free.patch +0040-continue-cgroup-deletion-when-errors-occur.patch