[PATCH v7 10/10] bpf: fix uninitialized warning
Marat Khalili
marat.khalili at huawei.com
Thu Jul 23 10:12:50 CEST 2026
> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Wednesday 22 July 2026 17:05
> To: dev at dpdk.org
> Cc: Stephen Hemminger <stephen at networkplumber.org>; stable at dpdk.org; Konstantin Ananyev
> <konstantin.ananyev at huawei.com>; Marat Khalili <marat.khalili at huawei.com>
> Subject: [PATCH v7 10/10] bpf: fix uninitialized warning
>
> Coverity complains uninitialized use of structure.
>
> Coverity issue: 504611
> Fixes: 17509d474226 ("bpf/validate: fix BPF_ADD of pointer to a scalar")
> Cc: stable at dpdk.org
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
> lib/bpf/bpf_validate.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/bpf/bpf_validate.c b/lib/bpf/bpf_validate.c
> index f9960088a2..44db85a5a3 100644
> --- a/lib/bpf/bpf_validate.c
> +++ b/lib/bpf/bpf_validate.c
> @@ -659,7 +659,7 @@ eval_apply_mask(struct bpf_reg_val *rv, uint64_t mask)
> static void
> eval_add(struct bpf_reg_val *rd, const struct bpf_reg_val *rs, uint64_t msk)
> {
> - struct bpf_reg_val rs_buf;
> + struct bpf_reg_val rs_buf = { 0 };
> struct bpf_reg_val rv;
>
> if (RTE_BPF_ARG_PTR_TYPE(rs->v.type) != 0) {
> --
> 2.53.0
Acked-by: Marat Khalili <marat.khalili at huawei.com>
More information about the dev
mailing list