Unverified Commit 9bd02221 by Christian Brauner Committed by Stéphane Graber

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: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 76208052
...@@ -1175,8 +1175,10 @@ static void *cgfsng_init(struct lxc_handler *handler) ...@@ -1175,8 +1175,10 @@ static void *cgfsng_init(struct lxc_handler *handler)
d->name = must_copy_string(handler->name); d->name = must_copy_string(handler->name);
/* copy per-container cgroup information */ /* copy per-container cgroup information */
d->cgroup_meta.dir = must_copy_string(handler->conf->cgroup_meta.dir); if (handler->conf) {
d->cgroup_meta.controllers = must_copy_string(handler->conf->cgroup_meta.controllers); 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 */ /* copy system-wide cgroup information */
cgroup_pattern = lxc_global_config_value("lxc.cgroup.pattern"); cgroup_pattern = lxc_global_config_value("lxc.cgroup.pattern");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment