Skip to content

Commit

Permalink
bpf/local_storage: Fix build without CONFIG_CGROUP
Browse files Browse the repository at this point in the history
local_storage.o has its compile guard as CONFIG_BPF_SYSCALL, which
does not imply that CONFIG_CGROUP is on. Including cgroup-internal.h
when CONFIG_CGROUP is off cause a compilation failure.

Fixes: f67cfc233706 ("bpf: Make cgroup storages shared between programs on the same cgroup")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: YiFei Zhu <zhuyifei@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200724211753.902969-1-zhuyifei1999@gmail.com
  • Loading branch information
YiFei Zhu authored and Alexei Starovoitov committed Jul 26, 2020
1 parent 36f7248 commit dfcdf0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/bpf/local_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
#include <linux/slab.h>
#include <uapi/linux/btf.h>

#include "../cgroup/cgroup-internal.h"

DEFINE_PER_CPU(struct bpf_cgroup_storage*, bpf_cgroup_storage[MAX_BPF_CGROUP_STORAGE_TYPE]);

#ifdef CONFIG_CGROUP_BPF

#include "../cgroup/cgroup-internal.h"

#define LOCAL_STORAGE_CREATE_FLAG_MASK \
(BPF_F_NUMA_NODE | BPF_F_ACCESS_MASK)

Expand Down

0 comments on commit dfcdf0e

Please sign in to comment.