]> Git Repo - linux.git/commitdiff
bpf/local_storage: Fix build without CONFIG_CGROUP
authorYiFei Zhu <[email protected]>
Fri, 24 Jul 2020 21:17:53 +0000 (16:17 -0500)
committerAlexei Starovoitov <[email protected]>
Sun, 26 Jul 2020 03:16:36 +0000 (20:16 -0700)
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 <[email protected]>
Signed-off-by: YiFei Zhu <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
kernel/bpf/local_storage.c

index 3b2c70197d78398df0c5734a9e78eb725c8fcb57..571bb351ed3bf38e1bea382c572e6739cba4a0ed 100644 (file)
@@ -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)
 
This page took 0.057558 seconds and 4 git commands to generate.