Re: [PATCH] selftests/bpf: signedness bug in enable_all_controllers()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 13, 2019 at 9:40 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
>
> 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@xxxxxxxxxx>
> ---

Thanks for the fix!

Acked-by: Andrii Nakryiko <andriin@xxxxxx>

>  tools/testing/selftests/bpf/cgroup_helpers.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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);
> --
> 2.20.1
>



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux