aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/netlink.c
diff options
context:
space:
mode:
authorToke Høiland-Jørgensen <[email protected]>2019-11-09 20:37:27 +0000
committerAlexei Starovoitov <[email protected]>2019-11-11 03:26:30 +0000
commitec6d5f47bfe36f46aa0de707e5beb2f58d96b76d (patch)
treef9bb7944a22d5e60f867ba88a18fa721d9562e92 /tools/lib/bpf/netlink.c
parentsamples: bpf: update map definition to new syntax BTF-defined map (diff)
downloadkernel-ec6d5f47bfe36f46aa0de707e5beb2f58d96b76d.tar.gz
kernel-ec6d5f47bfe36f46aa0de707e5beb2f58d96b76d.zip
libbpf: Unpin auto-pinned maps if loading fails
Since the automatic map-pinning happens during load, it will leave pinned maps around if the load fails at a later stage. Fix this by unpinning any pinned maps on cleanup. To avoid unpinning pinned maps that were reused rather than newly pinned, add a new boolean property on struct bpf_map to keep track of whether that map was reused or not; and only unpin those maps that were not reused. Fixes: 57a00f41644f ("libbpf: Add auto-pinning of maps when loading BPF objects") Signed-off-by: Toke Høiland-Jørgensen <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Acked-by: David S. Miller <[email protected]> Acked-by: Song Liu <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/netlink.c')
0 files changed, 0 insertions, 0 deletions