The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/1833

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
We can't rely in general on the presence of an initialized conf on cgroup init
time. One good example are our criu codepaths.

Signed-off-by: Christian Brauner <[email protected]>
From 9b5396f9d55aa5a251bfeaba1cd4e97e3183f387 Mon Sep 17 00:00:00 2001
From: Christian Brauner <[email protected]>
Date: Wed, 27 Sep 2017 18:24:42 +0200
Subject: [PATCH] cgfsng: check whether we have a conf

We can't rely in general on the presence of an initialized conf on cgroup init
time. One good example are our criu codepaths.

Signed-off-by: Christian Brauner <[email protected]>
---
 src/lxc/cgroups/cgfsng.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c
index ed391a616..897336f07 100644
--- a/src/lxc/cgroups/cgfsng.c
+++ b/src/lxc/cgroups/cgfsng.c
@@ -1175,8 +1175,10 @@ static void *cgfsng_init(struct lxc_handler *handler)
        d->name = must_copy_string(handler->name);
 
        /* copy per-container cgroup information */
-       d->cgroup_meta.dir = must_copy_string(handler->conf->cgroup_meta.dir);
-       d->cgroup_meta.controllers = 
must_copy_string(handler->conf->cgroup_meta.controllers);
+       if (handler->conf) {
+               d->cgroup_meta.dir = 
must_copy_string(handler->conf->cgroup_meta.dir);
+               d->cgroup_meta.controllers = 
must_copy_string(handler->conf->cgroup_meta.controllers);
+       }
 
        /* copy system-wide cgroup information */
        cgroup_pattern = lxc_global_config_value("lxc.cgroup.pattern");
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to