From: Stéphane Graber Date: Mon, 24 Sep 2018 18:41:37 +0000 (-0400) Subject: stop: Only freeze if freezer is available X-Git-Tag: lxc-3.1.0~90^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2645%2Fhead;p=thirdparty%2Flxc.git stop: Only freeze if freezer is available Closes #2644 Signed-off-by: Stéphane Graber --- 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;