Skip to content

Commit dfcdf0e

Browse files
zhuyifei1999Alexei Starovoitov
authored andcommitted
bpf/local_storage: Fix build without CONFIG_CGROUP
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
1 parent 36f7248 commit dfcdf0e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎kernel/bpf/local_storage.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
#include <linux/slab.h>
1010
#include <uapi/linux/btf.h>
1111

12-
#include "../cgroup/cgroup-internal.h"
13-
1412
DEFINE_PER_CPU(struct bpf_cgroup_storage*, bpf_cgroup_storage[MAX_BPF_CGROUP_STORAGE_TYPE]);
1513

1614
#ifdef CONFIG_CGROUP_BPF
1715

16+
#include "../cgroup/cgroup-internal.h"
17+
1818
#define LOCAL_STORAGE_CREATE_FLAG_MASK \
1919
(BPF_F_NUMA_NODE | BPF_F_ACCESS_MASK)
2020

0 commit comments

Comments
 (0)