bpf: btf: Ensure t->type == 0 for BTF_KIND_FWD
authorMartin KaFai Lau <kafai@fb.com>
Sat, 2 Jun 2018 16:06:51 +0000 (09:06 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 2 Jun 2018 18:22:36 +0000 (11:22 -0700)
commit8175383f2320dbc1b4e803d857ed499ed3e76199
treee567188ab587107f05d7faebe771de2e50ff241a
parentb9308ae696b2c35e862636eec631d95ff958c33d
bpf: btf: Ensure t->type == 0 for BTF_KIND_FWD

The t->type in BTF_KIND_FWD is not used.  It must be 0.
This patch ensures that and also adds a test case in test_btf.c

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/btf.c
tools/testing/selftests/bpf/test_btf.c