From d18d43da8955c327793c1b373c3abfee92f250ea Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Graber?= 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=utf8 Content-Transfer-Encoding: 8bit Closes #2644 Signed-off-by: Stéphane Graber --- 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; -- 2.47.2