[bug report] bpf: Introduce BPF_MAP_TYPE_STRUCT_OPS

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

 



Hello Martin KaFai Lau,

The patch 85d33df357b6: "bpf: Introduce BPF_MAP_TYPE_STRUCT_OPS" from
Jan 8, 2020, leads to the following static checker warning:

	kernel/bpf/bpf_struct_ops.c:501 bpf_struct_ops_map_seq_show_elem()
	warn: 'value' is an error pointer or valid

kernel/bpf/bpf_struct_ops.c
   495  static void bpf_struct_ops_map_seq_show_elem(struct bpf_map *map, void *key,
   496                                               struct seq_file *m)
   497  {
   498          void *value;
   499  
   500          value = bpf_struct_ops_map_lookup_elem(map, key);
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is just a dummy function that only returns -EINVAL.

   501          if (!value)
   502                  return;
   503  
   504          btf_type_seq_show(btf_vmlinux, map->btf_vmlinux_value_type_id,
   505                            value, m);
   506          seq_puts(m, "\n");
   507  }


regards,
dan carpenter



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux