]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Fix perf_buffer__free() API for sparse allocs
authorEelco Chaudron <echaudro@redhat.com>
Wed, 27 May 2020 08:42:00 +0000 (10:42 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 1 Jun 2020 21:38:21 +0000 (14:38 -0700)
commit070fa239e135f7fd402ae21b31eab396e8f1be62
tree9f30bade6912c01daf605dae76521b213c80f368
parentb1e5b7faad3132e7c21017cd52b2f499327fc2f3
libbpf: Fix perf_buffer__free() API for sparse allocs

In case the cpu_bufs are sparsely allocated they are not all
free'ed. These changes will fix this.

Fixes: 3e9c4f0d3be6 ("libbpf: add perf buffer API")
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/159056888305.330763.9684536967379110349.stgit@ebuild
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/libbpf.c