Files
runc/libcontainer/cgroups
Kir Kolyshkin bd50e7c420 libct/cg/OpenFile: check cgroupFd on error
opencontainers/runc issue 3026 describes a scenario in which OpenFile
failed to open a legitimate existing cgroupfs file. Added debug
(similar to what this commit does) shown that cgroupFd is no longer
opened to "/sys/fs/cgroup", but to "/" (it's not clear what caused it,
and the source code is not available, but they might be using the same
process on the both sides of the container/chroot/pivot_root/mntns
boundary, or remounting /sys/fs/cgroup).

Consider such use incorrect, but give a helpful hint as two what is
going on by wrapping the error in a more useful message.

NB: this can potentially be fixed by reopening the cgroupFd once we
detected that it's screwed, and retrying openat2. Alas I do not have
a test case for this, so left this as a TODO suggestion.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-08-11 17:00:05 -07:00
..
2021-07-27 01:41:47 -07:00
2021-07-27 01:41:47 -07:00
2021-07-27 01:41:47 -07:00
2021-04-29 15:30:12 -07:00
2021-01-19 18:02:11 +01:00
2021-06-22 16:09:47 -07:00