lkml.org 
[lkml]   [2018]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH bpf-next] bpf: NULL pointer check is not needed in BPF_CGROUP_RUN_PROG_INET_SOCK
From
From: Yafang Shao <laoar.shao@gmail.com>
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;
> BPF_CGROUP_RUN_PROG_INET_SOCK(sk);
>
> Signed-off-by: Yafang Shao <laoar.shao@gmail.com>

Acked-by: David S. Miller <davem@davemloft.net>

\
 
 \ /
  Last update: 2018-02-23 18:46    [W:0.663 / U:1.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site