bpf: Allow bpf_{s,g}etsockopt from cgroup bind{4,6} hooks
authorStanislav Fomichev <sdf@google.com>
Wed, 2 Dec 2020 17:25:15 +0000 (09:25 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 2 Dec 2020 21:25:11 +0000 (13:25 -0800)
commit427167c0b064ed898b848209add62b4322ec7840
tree7708fccc1fae344093e5835ee142118a1a251c2b
parenta999696c547f1a8ef2ddbb9b0e77abc3f6db4ff1
bpf: Allow bpf_{s,g}etsockopt from cgroup bind{4,6} hooks

I have to now lock/unlock socket for the bind hook execution.
That shouldn't cause any overhead because the socket is unbound
and shouldn't receive any traffic.

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrey Ignatov <rdna@fb.com>
Link: https://lore.kernel.org/bpf/20201202172516.3483656-3-sdf@google.com
include/linux/bpf-cgroup.h
net/core/filter.c
net/ipv4/af_inet.c
net/ipv6/af_inet6.c