lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMzD94T3TowoygCu3mAtd3WaZtSk1m1AVVpUHYB_bPAyE9QS3A@mail.gmail.com>
Date:   Thu, 16 Jan 2020 17:41:24 -0800
From:   Brian Vazquez <brianvv@...gle.com>
To:     YueHaibing <yuehaibing@...wei.com>
Cc:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>, kafai@...com,
        songliubraving@...com, Yonghong Song <yhs@...com>, andriin@...com,
        Linux NetDev <netdev@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH bpf-next] bpf: Remove set but not used variable 'first_key'

On Thu, Jan 16, 2020 at 5:38 PM YueHaibing <yuehaibing@...wei.com> wrote:
>
> kernel/bpf/syscall.c: In function generic_map_lookup_batch:
> kernel/bpf/syscall.c:1339:7: warning: variable first_key set but not used [-Wunused-but-set-variable]
>
> It is never used, so remove it.

Previous logic was using it but I forgot to delete it. Thanks for fixing it!

Acked-by: Brian Vazquez <brianvv@...gle.com>

>
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> ---
>  kernel/bpf/syscall.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
> index 0d94d36..c26a714 100644
> --- a/kernel/bpf/syscall.c
> +++ b/kernel/bpf/syscall.c
> @@ -1336,7 +1336,6 @@ int generic_map_lookup_batch(struct bpf_map *map,
>         void *buf, *buf_prevkey, *prev_key, *key, *value;
>         int err, retry = MAP_LOOKUP_RETRIES;
>         u32 value_size, cp, max_count;
> -       bool first_key = false;
>
>         if (attr->batch.elem_flags & ~BPF_F_LOCK)
>                 return -EINVAL;
> @@ -1365,7 +1364,6 @@ int generic_map_lookup_batch(struct bpf_map *map,
>         }
>
>         err = -EFAULT;
> -       first_key = false;
>         prev_key = NULL;
>         if (ubatch && copy_from_user(buf_prevkey, ubatch, map->key_size))
>                 goto free_buf;
> --
> 2.7.4
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ