Re: [PATCH bpf-next] bpf: NULL pointer check is not needed in BPF_CGROUP_RUN_PROG_INET_SOCK

2018-02-23 Thread David Miller
From: Yafang Shao Date: Fri, 23 Feb 2018 14:58:41 +0800 > 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) >

Re: [PATCH bpf-next] bpf: NULL pointer check is not needed in BPF_CGROUP_RUN_PROG_INET_SOCK

2018-02-23 Thread David Miller
From: Yafang Shao Date: Fri, 23 Feb 2018 14:58:41 +0800 > 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; >

Re: [PATCH bpf-next] bpf: NULL pointer check is not needed in BPF_CGROUP_RUN_PROG_INET_SOCK

2018-02-23 Thread Daniel Borkmann
On 02/23/2018 07:58 AM, Yafang Shao wrote: > 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; >

Re: [PATCH bpf-next] bpf: NULL pointer check is not needed in BPF_CGROUP_RUN_PROG_INET_SOCK

2018-02-23 Thread Daniel Borkmann
On 02/23/2018 07:58 AM, Yafang Shao wrote: > 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; >