• Roman Gushchin's avatar
    bpf: fix rcu annotations in compute_effective_progs() · 3960f4fd
    Roman Gushchin authored
    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: 324bda9e ("bpf: multi program support for cgroup+bpf")
    Signed-off-by: default avatarRoman Gushchin <guro@fb.com>
    Cc: Alexei Starovoitov <ast@kernel.org>
    Cc: Daniel Borkmann <daniel@iogearbox.net>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    3960f4fd
cgroup.c 18.2 KB