Skip to content

libbpf: fix inner map removal in bpf_object__create_map

Martynas Pumputis bpf 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesIn review
  2. v12 patches 11 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2libbpf: fix removal of inner map in bpf_object__create_maptools/lib/bpf/libbpf.c+4 -61 reply
2/2selftests/bpf: check inner map deletiontools/testing/selftests/bpf/progs/test_map_in_map_invalid.c tools/testing/selftests/bpf/test_maps.c+89 -12 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchJohn Fastabend
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 bpf 0/2] libbpf: fix inner map removal in bpf_object__create_map

This patch set fixes the removal of a BTF-defined inner map if the creation of the outer map has failed. This was identified by Andrii in [1].

[1]: https://lore.kernel.org/bpf/CAEf4BzYaQsD6NaEUij6ttDeKYP7oEB0=c0D9_xdAKw6FYb7h1g@mail.gmail.com/

Martynas Pumputis (2):
libbpf: fix removal of inner map in bpf_object__create_map selftests/bpf: check inner map deletion

 tools/lib/bpf/libbpf.c                        | 11 ++--
 .../bpf/progs/test_map_in_map_invalid.c       | 26 ++++++++
 tools/testing/selftests/bpf/test_maps.c       | 64 ++++++++++++++++++-
 3 files changed, 95 insertions(+), 6 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/test_map_in_map_invalid.c
Signature · 1 line
2.32.0