mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 07:33:48 +00:00
cgroups: skip v2 hierarchy entry
Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
This commit is contained in:
parent
7a8082f47b
commit
ff8d6ee936
@ -686,6 +686,18 @@ static void get_existing_subsystems(char ***klist, char ***nlist)
|
||||
if (!p2)
|
||||
continue;
|
||||
*p2 = '\0';
|
||||
|
||||
/* If we have a mixture between cgroup v1 and cgroup v2
|
||||
* hierarchies, then /proc/self/cgroup contains entries of the
|
||||
* form:
|
||||
*
|
||||
* 0::/some/path
|
||||
*
|
||||
* We need to skip those.
|
||||
*/
|
||||
if ((p2 - p) == 0)
|
||||
continue;
|
||||
|
||||
for (tok = strtok_r(p, ",", &saveptr); tok;
|
||||
tok = strtok_r(NULL, ",", &saveptr)) {
|
||||
if (strncmp(tok, "name=", 5) == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user