Commit cabd3e88 authored by Dan Carpenter's avatar Dan Carpenter Committed by Daniel Borkmann

selftests/bpf: signedness bug in enable_all_controllers()

The "len" variable needs to be signed for the error handling to work
properly.

Fixes: 596092ef ("selftests/bpf: enable all available cgroup v2 controllers")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarAndrii Nakryiko <andriin@fb.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent b552d33c
......@@ -47,7 +47,7 @@ int enable_all_controllers(char *cgroup_path)
char buf[PATH_MAX];
char *c, *c2;
int fd, cfd;
size_t len;
ssize_t len;
snprintf(path, sizeof(path), "%s/cgroup.controllers", cgroup_path);
fd = open(path, O_RDONLY);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment