From 8ef31f0e2abfd9d2c4803727422cabc850f52848 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Sat, 30 May 2020 08:11:47 +0200 Subject: [PATCH] reapplying patch to fix cgroups cpuset initialization (rhbz#1816949) --- lxc-3.2.1-cgroups-fix-cpuset-init.patch | 34 +++++++++++++++++++++++++ lxc.spec | 6 ++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 lxc-3.2.1-cgroups-fix-cpuset-init.patch diff --git a/lxc-3.2.1-cgroups-fix-cpuset-init.patch b/lxc-3.2.1-cgroups-fix-cpuset-init.patch new file mode 100644 index 0000000..aa2838a --- /dev/null +++ b/lxc-3.2.1-cgroups-fix-cpuset-init.patch @@ -0,0 +1,34 @@ +From b31d62b847a3ee013613795094cce4acc12345ef Mon Sep 17 00:00:00 2001 +From: Christian Brauner +Date: Sun, 28 Jul 2019 23:13:26 +0200 +Subject: [PATCH] cgroups: initialize cpuset properly + +Closes #3108. +Signed-off-by: Christian Brauner +--- + src/lxc/cgroups/cgfsng.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c +index 7b8fe6736f..c29c0958e9 100644 +--- a/src/lxc/cgroups/cgfsng.c ++++ b/src/lxc/cgroups/cgfsng.c +@@ -496,12 +496,12 @@ static bool cg_legacy_filter_and_set_cpus(char *path, bool am_initialized) + } + + if (!flipped_bit) { +- DEBUG("No isolated or offline cpus present in cpuset"); +- return true; ++ cpulist = lxc_cpumask_to_cpulist(possmask, maxposs); ++ TRACE("No isolated or offline cpus present in cpuset"); ++ } else { ++ cpulist = move_ptr(posscpus); ++ TRACE("Removed isolated or offline cpus from cpuset"); + } +- DEBUG("Removed isolated or offline cpus from cpuset"); +- +- cpulist = lxc_cpumask_to_cpulist(possmask, maxposs); + if (!cpulist) { + ERROR("Failed to create cpu list"); + return false; + diff --git a/lxc.spec b/lxc.spec index 2ce2814..6785bb6 100644 --- a/lxc.spec +++ b/lxc.spec @@ -11,13 +11,14 @@ Name: lxc Version: 3.2.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Linux Resource Containers License: LGPLv2+ and GPLv2 URL: http://linuxcontainers.org/lxc Source0: http://linuxcontainers.org/downloads/%{name}-%{version}.tar.gz Patch0: lxc-2.0.7-fix-init.patch Patch1: lxc-2.0.6-fix-lxc-net.patch +Patch2: lxc-3.2.1-cgroups-fix-cpuset-init.patch BuildRequires: docbook2X BuildRequires: doxygen BuildRequires: kernel-headers @@ -251,6 +252,9 @@ make check %changelog +* Sat May 30 2020 Timotheus Pokorra - 3.2.1-3 +- reapplying patch to fix cgroups cpuset initialization (rhbz#1816949) + * Wed Jan 29 2020 Fedora Release Engineering - 3.2.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild