Before this patch check is happened only in case when we try to find
cgroup at cgroup2 mount point.
v2:
- add Fixes line before Signed-off-by (David Ahern)
Fixes: d5e6ee0dac64 ("ss: introduce cgroup2 cache and helper functions")
Signed-off-by: Dmitry Yakunin <zeil@yandex-team.ru>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
strerror(errno));
goto out;
}
- if (fhp->handle_bytes != sizeof(__u64)) {
- fprintf(stderr, "Invalid size of cgroup2 ID\n");
- goto out;
- }
+ }
+ if (fhp->handle_bytes != sizeof(__u64)) {
+ fprintf(stderr, "Invalid size of cgroup2 ID\n");
+ goto out;
}
memcpy(cg_id.bytes, fhp->f_handle, sizeof(__u64));