diff options
author | Alexei Starovoitov <ast@kernel.org> | 2019-11-14 21:57:14 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-11-16 01:44:20 +0300 |
commit | 9cc31b3a092d9bf2a18f09ad77e727ddb42a5b1e (patch) | |
tree | 36be1bd2c248be20e0688560b3b678357807444e /include/linux/interval_tree.h | |
parent | 9fd4a39dc7fe734d26eb89ea97e8c91331c6378c (diff) | |
download | linux-9cc31b3a092d9bf2a18f09ad77e727ddb42a5b1e.tar.xz |
bpf: Fix race in btf_resolve_helper_id()
btf_resolve_helper_id() caching logic is a bit racy, since under root the
verifier can verify several programs in parallel. Fix it with READ/WRITE_ONCE.
Fix the type as well, since error is also recorded.
Fixes: a7658e1a4164 ("bpf: Check types of arguments passed into helpers")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20191114185720.1641606-15-ast@kernel.org
Diffstat (limited to 'include/linux/interval_tree.h')
0 files changed, 0 insertions, 0 deletions