On 07/03/2019 10:26 AM, YueHaibing wrote: > If CONFIG_NET is not set and CONFIG_CGROUP_BPF=y, > gcc building fails: > > kernel/bpf/cgroup.o: In function `cg_sockopt_func_proto': > cgroup.c:(.text+0x237e): undefined reference to `bpf_sk_storage_get_proto' > cgroup.c:(.text+0x2394): undefined reference to `bpf_sk_storage_delete_proto' > kernel/bpf/cgroup.o: In function `__cgroup_bpf_run_filter_getsockopt': > (.text+0x2a1f): undefined reference to `lock_sock_nested' > (.text+0x2ca2): undefined reference to `release_sock' > kernel/bpf/cgroup.o: In function `__cgroup_bpf_run_filter_setsockopt': > (.text+0x3006): undefined reference to `lock_sock_nested' > (.text+0x32bb): undefined reference to `release_sock' > > Reported-by: Hulk Robot <hulkci@xxxxxxxxxx> > Suggested-by: Stanislav Fomichev <sdf@xxxxxxxxxxx> > Fixes: 0d01da6afc54 ("bpf: implement getsockopt and setsockopt hooks") > Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx> Applied, thanks!