From 030fa4affda75402bf9c2819c7050de27da1a3b0 Mon Sep 17 00:00:00 2001 From: dschervov Date: Wed, 5 Feb 2025 20:04:37 +0300 Subject: [PATCH] criu: fix internal representation of cgroups hierarchical structure strstartswith() function is incorrect choice for finding parent directory so i change it to issubpath() function Signed-off-by: Dmitrii Chervov --- criu/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/criu/cgroup.c b/criu/cgroup.c index fcaed0708..9246be639 100644 --- a/criu/cgroup.c +++ b/criu/cgroup.c @@ -248,7 +248,7 @@ static int find_dir(const char *path, struct list_head *dirs, struct cgroup_dir return EXACT_MATCH; } - if (strstartswith(path, d->path)) { + if (issubpath(path, d->path)) { int ret = find_dir(path, &d->children, rdir); if (ret == NO_MATCH) { *rdir = d;