diff options
| author | Roman Gushchin <guro@fb.com> | 2018-07-13 12:41:11 -0700 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2022-04-19 00:51:51 +0300 |
| commit | bfe07625deded524e7b7c68fdbe26dc0b8ada071 (patch) | |
| tree | 6e510cc7ab4941097c2a86f2fc0fc6cabd4e6eed /kernel/bpf/core.c | |
| parent | 7679bac78e3329a90177649a3a83f087f934fec4 (diff) | |
UPSTREAM: bpf: fix rcu annotations in compute_effective_progs()
The progs local variable in compute_effective_progs() is marked
as __rcu, which is not correct. This is a local pointer, which
is initialized by bpf_prog_array_alloc(), which also now
returns a generic non-rcu pointer.
The real rcu-protected pointer is *array (array is a pointer
to an RCU-protected pointer), so the assignment should be performed
using rcu_assign_pointer().
Fixes: 324bda9e6c5a ("bpf: multi program support for cgroup+bpf")
Signed-off-by: Roman Gushchin <guro@fb.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
(cherry picked from commit 3960f4fd6585608e8cc285d9665821985494e147)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie1eec4e3148a4c802759a3f0257dfae4a9333520
Diffstat (limited to 'kernel/bpf/core.c')
0 files changed, 0 insertions, 0 deletions
