diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-06-13 09:00:21 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-06-15 01:14:07 +0200 |
commit | cabd3e889b5772a0dc448ddca9a4b23591640bca (patch) | |
tree | 76e447b65525320ee12742c1b97f697a908c25ad /tools/testing/selftests/bpf/cgroup_helpers.c | |
parent | samples/bpf: fix include path in Makefile (diff) | |
download | linux-cabd3e889b5772a0dc448ddca9a4b23591640bca.tar.xz linux-cabd3e889b5772a0dc448ddca9a4b23591640bca.zip |
selftests/bpf: signedness bug in enable_all_controllers()
The "len" variable needs to be signed for the error handling to work
properly.
Fixes: 596092ef8bea ("selftests/bpf: enable all available cgroup v2 controllers")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/testing/selftests/bpf/cgroup_helpers.c')
-rw-r--r-- | tools/testing/selftests/bpf/cgroup_helpers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/cgroup_helpers.c b/tools/testing/selftests/bpf/cgroup_helpers.c index 0d89f0396be4..e95c33e333a4 100644 --- a/tools/testing/selftests/bpf/cgroup_helpers.c +++ b/tools/testing/selftests/bpf/cgroup_helpers.c @@ -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); |