Thread (2 messages) 2 messages, 2 authors, 2021-10-27

Re: [PATCH v2] libbpf: Deprecate bpf_objects_list

From: Andrii Nakryiko <hidden>
Date: 2021-10-27 18:02:04
Also in: bpf, lkml

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(-)
[...]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help