]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9a0cdf56553166a3013dd016993acd5c608eb65a
treee567188ab587107f05d7faebe771de2e50ff241a
parented1f6ab53f7c05dfeb4ca37d752d958b25a6ad70
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