]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: export bpf_map_inc_not_zero
authorStanislav Fomichev <sdf@google.com>
Wed, 14 Aug 2019 17:37:48 +0000 (10:37 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Sat, 17 Aug 2019 21:18:54 +0000 (23:18 +0200)
commitc9056716d599be4dcf15f78a6038657e45f65132
tree35f71eca49d4baa3ce31be4c830db41f60f2cb32
parentfc4e8b4cbb963adf36394f711302872295746963
bpf: export bpf_map_inc_not_zero

Rename existing bpf_map_inc_not_zero to __bpf_map_inc_not_zero to
indicate that it's caller's responsibility to do proper locking.
Create and export bpf_map_inc_not_zero wrapper that properly
locks map_idr_lock. Will be used in the next commit to
hold a map while cloning a socket.

Cc: Martin KaFai Lau <kafai@fb.com>
Cc: Yonghong Song <yhs@fb.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
include/linux/bpf.h
kernel/bpf/syscall.c