bpf: Convert bpf_prog refcnt to atomic64_t
authorAndrii Nakryiko <andriin@fb.com>
Sun, 17 Nov 2019 17:28:03 +0000 (09:28 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 18 Nov 2019 10:41:59 +0000 (11:41 +0100)
commit85192dbf4de08795afe2b88e52a36fc6abfc3dba
tree52379ced52c2c2ed5f023073a1aeeb52779e376d
parent1e0bd5a091e5d9e0f1d5b0e6329b87bb1792f784
bpf: Convert bpf_prog refcnt to atomic64_t

Similarly to bpf_map's refcnt/usercnt, convert bpf_prog's refcnt to atomic64
and remove artificial 32k limit. This allows to make bpf_prog's refcounting
non-failing, simplifying logic of users of bpf_prog_add/bpf_prog_inc.

Validated compilation by running allyesconfig kernel build.

Suggested-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20191117172806.2195367-3-andriin@fb.com
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/cavium/thunder/nicvf_main.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/qlogic/qede/qede_main.c
drivers/net/virtio_net.c
include/linux/bpf.h
kernel/bpf/inode.c
kernel/bpf/syscall.c
kernel/events/core.c