]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
stop: Only freeze if freezer is available 2645/head
authorStéphane Graber <stgraber@ubuntu.com>
Mon, 24 Sep 2018 18:41:37 +0000 (14:41 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 24 Sep 2018 18:41:42 +0000 (14:41 -0400)
Closes #2644

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/commands.c

index b83f1c4c428775c8bbe862f0277604fc2dd78919..09379dec9453f6c166361d42ea01614d81b847ce 100644 (file)
@@ -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;