[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQJzM3DH_gxAwo2mnGiv7bOsip1TAFF8YGPLx-dqSb1SPQ@mail.gmail.com>
Date: Mon, 16 Oct 2017 15:06:08 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Richard Weinberger <richard@....at>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...nel.org>
Subject: Re: [PATCH 1/3] bpf: Don't check for current being NULL
On Mon, Oct 16, 2017 at 11:18 AM, Richard Weinberger <richard@....at> wrote:
> current is never NULL.
>
> Signed-off-by: Richard Weinberger <richard@....at>
> ---
> kernel/bpf/helpers.c | 12 ------------
> 1 file changed, 12 deletions(-)
>
> diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c
> index 3d24e238221e..e8845adcd15e 100644
> --- a/kernel/bpf/helpers.c
> +++ b/kernel/bpf/helpers.c
> @@ -120,9 +120,6 @@ BPF_CALL_0(bpf_get_current_pid_tgid)
> {
> struct task_struct *task = current;
>
> - if (unlikely(!task))
> - return -EINVAL;
> -
really? in all context? including irq and nmi?
Powered by blists - more mailing lists