summaryrefslogtreecommitdiff
path: root/app-emulation/libvirt/files/libvirt-7.9.0-fix_cgroupv2.patch
blob: 1309996f3ecf2362e8aa768e9a62f53b962e79cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From c80a05cd7d5f17ee16a2bc2546981863451fcab7 Mon Sep 17 00:00:00 2001
From: "System user; portage" <portage@kestrel.43-1.org>
Date: Wed, 8 Dec 2021 15:07:06 -0600
Subject: [PATCH] Revert "lxc: controller: Fix container launch on cgroup v1"

This reverts commit 1b9ce05ce241a581d4e80228c92ceb0266f21f94.
---
 src/lxc/lxc_controller.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 444f728af4..8953e0c904 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -865,12 +865,12 @@ static int virLXCControllerSetupCgroupLimits(virLXCController *ctrl)
     nodeset = virDomainNumatuneGetNodeset(ctrl->def->numa, auto_nodeset, -1);
 
     if (!(ctrl->cgroup = virLXCCgroupCreate(ctrl->def,
-                                            getpid(),
+                                            ctrl->initpid,
                                             ctrl->nnicindexes,
                                             ctrl->nicindexes)))
         goto cleanup;
 
-    if (virCgroupAddMachineProcess(ctrl->cgroup, ctrl->initpid) < 0)
+    if (virCgroupAddMachineProcess(ctrl->cgroup, getpid()) < 0)
         goto cleanup;
 
     /* Add all qemu-nbd tasks to the cgroup */
-- 
2.32.0