]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Move BPF_MAP_TYPE for INODE_STORAGE and TASK_STORAGE outside of CONFIG_NET
authorTejun Heo <tj@kernel.org>
Thu, 21 Oct 2021 18:46:10 +0000 (08:46 -1000)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 26 Oct 2021 19:35:16 +0000 (12:35 -0700)
commit719a382d2e3c947de2bfd685886248b3445553f0
treeaa7c8bf91d82ffb445d20c9adf58cf11b5b2d9c3
parentba930c1a01f79b30a730115f7f39d037782c0afb
bpf: Move BPF_MAP_TYPE for INODE_STORAGE and TASK_STORAGE outside of CONFIG_NET

bpf_types.h has BPF_MAP_TYPE_INODE_STORAGE and BPF_MAP_TYPE_TASK_STORAGE
declared inside #ifdef CONFIG_NET although they are built regardless of
CONFIG_NET. So, when CONFIG_BPF_SYSCALL && !CONFIG_NET, they are built
without the declarations leading to spurious build failures and not
registered to bpf_map_types making them unavailable.

Fix it by moving the BPF_MAP_TYPE for the two map types outside of
CONFIG_NET.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: c1098383ac9d ("bpf: Enable task local storage for tracing programs")
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/YXG1cuuSJDqHQfRY@slm.duckdns.org
include/linux/bpf_types.h