commit | ee07862f7b4594d390b978f6636a6a6191632ab3 | [log] [tgz] |
---|---|---|
author | Yafang Shao <laoar.shao@gmail.com> | Fri Feb 23 14:58:41 2018 +0800 |
committer | Daniel Borkmann <daniel@iogearbox.net> | Fri Feb 23 16:23:11 2018 +0100 |
tree | f72ef4109f87aad9951bf5d3641db327374ea071 | |
parent | 0b6b8a3dd86db78c3f38587d667d77065c75e4f8 [diff] |
bpf: NULL pointer check is not needed in BPF_CGROUP_RUN_PROG_INET_SOCK sk is already allocated in inet_create/inet6_create, hence when BPF_CGROUP_RUN_PROG_INET_SOCK is executed sk will never be NULL. The logic is as bellow, sk = sk_alloc(); if (!sk) goto out; BPF_CGROUP_RUN_PROG_INET_SOCK(sk); Signed-off-by: Yafang Shao <laoar.shao@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>