* [PATCH bpf-next] bpf/local_storage: Fix build without CONFIG_CGROUP
@ 2020-07-24 21:17 YiFei Zhu
2020-07-25 8:30 ` Alexei Starovoitov
0 siblings, 1 reply; 2+ messages in thread
From: YiFei Zhu @ 2020-07-24 21:17 UTC (permalink / raw)
To: bpf
Cc: Alexei Starovoitov, Daniel Borkmann, Stanislav Fomichev,
Martin KaFai Lau, YiFei Zhu, kernel test robot
From: YiFei Zhu <zhuyifei@google.com>
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.
Reported-by: kernel test robot <lkp@intel.com>
Fixes: f67cfc233706 ("bpf: Make cgroup storages shared between programs on the same cgroup")
Signed-off-by: YiFei Zhu <zhuyifei@google.com>
---
kernel/bpf/local_storage.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/bpf/local_storage.c b/kernel/bpf/local_storage.c
index 3b2c70197d78..571bb351ed3b 100644
--- a/kernel/bpf/local_storage.c
+++ b/kernel/bpf/local_storage.c
@@ -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)
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf-next] bpf/local_storage: Fix build without CONFIG_CGROUP
2020-07-24 21:17 [PATCH bpf-next] bpf/local_storage: Fix build without CONFIG_CGROUP YiFei Zhu
@ 2020-07-25 8:30 ` Alexei Starovoitov
0 siblings, 0 replies; 2+ messages in thread
From: Alexei Starovoitov @ 2020-07-25 8:30 UTC (permalink / raw)
To: YiFei Zhu
Cc: bpf, Alexei Starovoitov, Daniel Borkmann, Stanislav Fomichev,
Martin KaFai Lau, YiFei Zhu, kernel test robot
On Fri, Jul 24, 2020 at 2:18 PM YiFei Zhu <zhuyifei1999@gmail.com> wrote:
>
> From: YiFei Zhu <zhuyifei@google.com>
>
> 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.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: f67cfc233706 ("bpf: Make cgroup storages shared between programs on the same cgroup")
> Signed-off-by: YiFei Zhu <zhuyifei@google.com>
Applied. Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-25 8:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24 21:17 [PATCH bpf-next] bpf/local_storage: Fix build without CONFIG_CGROUP YiFei Zhu
2020-07-25 8:30 ` Alexei Starovoitov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.