linux/drivers/net/ethernet/netronome/nfp/bpf
YiFei Zhu 984fe94f94 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 <zhuyifei@google.com>
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Cc: YiFei Zhu <zhuyifei1999@gmail.com>
Link: https://lore.kernel.org/bpf/20200915234543.3220146-2-sdf@google.com
2020-09-15 18:28:27 -07:00
..
cmsg.c nfp: bpf: add simple map op cache 2019-08-31 00:49:05 +02:00
fw.h netronome: Replace zero-length array with flexible-array member 2020-02-24 15:26:17 -08:00
jit.c treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00
main.c treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00
main.h nfp: bpf: add simple map op cache 2019-08-31 00:49:05 +02:00
offload.c bpf: Mutex protect used_maps array and count 2020-09-15 18:28:27 -07:00
verifier.c nfp: bpf: eliminate zero extension code-gen 2019-05-24 18:58:38 -07:00