cgroup: check whether unified hierarchy is writable
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 22 Nov 2017 16:20:35 +0000 (17:20 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 22 Nov 2017 16:34:25 +0000 (17:34 +0100)
commite07aefbd675b651f8d45b5fb458f2747b04d6e04
treec4a437e13858f4340e4926fb3a9f44f84271ca79
parentbfbcf21d75f103e639a7d18691b3f2a334b7e6f7
cgroup: check whether unified hierarchy is writable

When systemd is running inside a container employing user
namespaces it currently mounts the unified cgroup hierarchy
without being able to write to it. This causes systemd to
freeze during boot.
This patch checks whether the unified cgroup hierarchy
is writable. If it is not it will not mount it.

This solution is based on a patch by Evgeny Vereshchagin.

Closes #6408.
Closes https://github.com/lxc/lxc/issues/1678 .
src/core/mount-setup.c