On Tue, Oct 26, 2021 at 3:35 PM Joe Burton [off-list ref] wrote:
From: Joe Burton <redacted>
Add a flag to `enum libbpf_strict_mode' to disable the global
`bpf_objects_list', preventing race conditions when concurrent threads
call bpf_object__open() or bpf_object__close().
bpf_object__next() will return NULL if this option is set.
Callers may achieve the same workflow by tracking bpf_objects in
application code.
[0] Closes: https://github.com/libbpf/libbpf/issues/293
Signed-off-by: Joe Burton <redacted>
---
Applied to bpf-next, thanks. Please specify kernel tree next time
(i.e., [PATCH bpf-next] subject prefix)
tools/lib/bpf/libbpf.c | 8 +++++++-
tools/lib/bpf/libbpf.h | 3 ++-
tools/lib/bpf/libbpf_legacy.h | 6 ++++++
3 files changed, 15 insertions(+), 2 deletions(-)
[...]