[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5ccc063c-6b71-0093-5312-c6d1e96fabd3@iogearbox.net>
Date: Fri, 23 Feb 2018 16:30:38 +0100
From: Daniel Borkmann <daniel@...earbox.net>
To: Yafang Shao <laoar.shao@...il.com>, dsa@...ulusnetworks.com,
ast@...nel.org
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH bpf-next] bpf: NULL pointer check is not needed in
BPF_CGROUP_RUN_PROG_INET_SOCK
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;
> BPF_CGROUP_RUN_PROG_INET_SOCK(sk);
>
> Signed-off-by: Yafang Shao <laoar.shao@...il.com>
Agree, applied to bpf-next, thanks Yafang!
Powered by blists - more mailing lists