mirror of
https://github.com/torvalds/linux.git
synced 2026-09-14 16:10:02 +02:00
bpftool cgroup show and tree call libbpf_find_kernel_btf() to
resolve attach_btf names, but never release the returned BTF object.
For cgroup tree, do_show_tree_fn() is called once for each cgroup
visited by nftw(). When more than one cgroup has attached programs,
each callback overwrites btf_vmlinux with a new object and loses the
previous allocation.
Load vmlinux BTF only once during a tree walk and release it when
cgroup show or tree completes. Reset btf_vmlinux_id at the same time
so batch mode starts with clean state.
Fixes:
|
||
|---|---|---|
| .. | ||
| bash-completion | ||
| Documentation | ||
| skeleton | ||
| .gitignore | ||
| btf_dumper.c | ||
| btf.c | ||
| cfg.c | ||
| cfg.h | ||
| cgroup.c | ||
| common.c | ||
| feature.c | ||
| gen.c | ||
| iter.c | ||
| jit_disasm.c | ||
| json_writer.c | ||
| json_writer.h | ||
| link.c | ||
| main.c | ||
| main.h | ||
| Makefile | ||
| map_perf_ring.c | ||
| map.c | ||
| net.c | ||
| netlink_dumper.c | ||
| netlink_dumper.h | ||
| perf.c | ||
| pids.c | ||
| prog.c | ||
| sign.c | ||
| struct_ops.c | ||
| token.c | ||
| tracelog.c | ||
| xlated_dumper.c | ||
| xlated_dumper.h | ||