diff options
| author | Alan Maguire <[email protected]> | 2020-11-15 10:46:35 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2020-11-17 04:51:34 +0000 |
| commit | de91e631bdc7e6411989e1a9ab65501a31527e0b (patch) | |
| tree | 7f5196cd11d19baeb101bc885d18e0d43037fd64 /scripts/bpf_helpers_doc.py | |
| parent | bpf: Fix the irq and nmi check in bpf_sk_storage for tracing usage (diff) | |
| download | kernel-de91e631bdc7e6411989e1a9ab65501a31527e0b.tar.gz kernel-de91e631bdc7e6411989e1a9ab65501a31527e0b.zip | |
libbpf: bpf__find_by_name[_kind] should use btf__get_nr_types()
When operating on split BTF, btf__find_by_name[_kind] will not
iterate over all types since they use btf->nr_types to show
the number of types to iterate over. For split BTF this is
the number of types _on top of base BTF_, so it will
underestimate the number of types to iterate over, especially
for vmlinux + module BTF, where the latter is much smaller.
Use btf__get_nr_types() instead.
Fixes: ba451366bf44 ("libbpf: Implement basic split BTF support")
Signed-off-by: Alan Maguire <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'scripts/bpf_helpers_doc.py')
0 files changed, 0 insertions, 0 deletions
