aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/bpf.c
diff options
context:
space:
mode:
authorYiFei Zhu <[email protected]>2020-09-15 23:45:39 +0000
committerAlexei Starovoitov <[email protected]>2020-09-16 01:28:27 +0000
commit984fe94f94756dacb3c8cc52904a23adf9e04da1 (patch)
tree70c58720e1166b35434d2033abcdda63e915f6d3 /tools/lib/bpf/bpf.c
parentlibbpf: Fix a compilation error with xsk.c for ubuntu 16.04 (diff)
downloadkernel-984fe94f94756dacb3c8cc52904a23adf9e04da1.tar.gz
kernel-984fe94f94756dacb3c8cc52904a23adf9e04da1.zip
bpf: Mutex protect used_maps array and count
To support modifying the used_maps array, we use a mutex to protect the use of the counter and the array. The mutex is initialized right after the prog aux is allocated, and destroyed right before prog aux is freed. This way we guarantee it's initialized for both cBPF and eBPF. Signed-off-by: YiFei Zhu <[email protected]> Signed-off-by: Stanislav Fomichev <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Cc: YiFei Zhu <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/bpf.c')
0 files changed, 0 insertions, 0 deletions