[lxc-devel] [lxc/master] stop: Only freeze if freezer is available
stgraber on Github
lxc-bot at linuxcontainers.org
Mon Sep 24 18:42:30 UTC 2018
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 370 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180924/3b54fd20/attachment.bin>
-------------- next part --------------
From d18d43da8955c327793c1b373c3abfee92f250ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Mon, 24 Sep 2018 14:41:37 -0400
Subject: [PATCH] stop: Only freeze if freezer is available
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Closes #2644
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
src/lxc/commands.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/lxc/commands.c b/src/lxc/commands.c
index b83f1c4c4..09379dec9 100644
--- a/src/lxc/commands.c
+++ b/src/lxc/commands.c
@@ -654,6 +654,9 @@ static int lxc_cmd_stop_callback(int fd, struct lxc_cmd_req *req,
* lxc_unfreeze() would do another cmd (GET_CGROUP) which would
* deadlock us.
*/
+ if (cgroup_ops->get_cgroup(cgroup_ops, "freezer") == NULL)
+ return 0;
+
if (cgroup_ops->unfreeze(cgroup_ops))
return 0;
More information about the lxc-devel
mailing list