cgroups: ensure that cgroup_root is initialized in legacy codepaths

parent 9bca62b3
...@@ -2143,6 +2143,9 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops, ...@@ -2143,6 +2143,9 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops,
if (!cg_mount_needs_subdirs(cg_flags)) if (!cg_mount_needs_subdirs(cg_flags))
continue; continue;
if (!cgroup_root)
cgroup_root = must_make_path(rootfs_mnt, DEFAULT_CGROUP_MOUNTPOINT, NULL);
controllerpath = must_make_path(cgroup_root, controller, NULL); controllerpath = must_make_path(cgroup_root, controller, NULL);
if (dir_exists(controllerpath)) if (dir_exists(controllerpath))
continue; continue;
......
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