Skip to content

cgroup2 detection is faulty #257

@haesbaert

Description

@haesbaert

From /proc/mounts

cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot 0 0
^ we look here           ^ we should look here       

The first word is whatever is used in the first argument of mount, which for these filesystems can be "anything", for example:

mount("cgroup2", "/sys/fs/cgroup", "cgroup2", 0, NULL)
VS
mount(NULL, "/sys/fs/cgroup", "cgroup2", 0, NULL)

Are both valid, but the second will print "none" in the first word of /proc/mounts.

We should look at the third word, not the first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions