bpf: fix lsm_cgroup build errors on esoteric configs
authorStanislav Fomichev <sdf@google.com>
Thu, 14 Jul 2022 18:54:04 +0000 (11:54 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 19 Jul 2022 16:40:41 +0000 (09:40 -0700)
commit3908fcddc65d04e069b03be49b33fae90e424631
tree40b3fe4cbf6e500e7b8da245ca0b36b32496b798
parentab850abbcf4d52ecc0e17224bcbcf749f327d6d0
bpf: fix lsm_cgroup build errors on esoteric configs

This particular ones is about having the following:
 CONFIG_BPF_LSM=y
 # CONFIG_CGROUP_BPF is not set

Also, add __maybe_unused to the args for the !CONFIG_NET cases.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/r/20220714185404.3647772-1-sdf@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/bpf_lsm.c
kernel/bpf/trampoline.c