[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAADnVQ+90dHXwwuES9aQ5Hmf-B8=kceJo+0Ne4myn8xhbssBYg@mail.gmail.com>
Date: Tue, 21 Jan 2020 18:30:07 -0800
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Song Liu <songliubraving@...com>
Cc: Alexei Starovoitov <ast@...nel.org>,
David Miller <davem@...emloft.net>,
"daniel@...earbox.net" <daniel@...earbox.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"bpf@...r.kernel.org" <bpf@...r.kernel.org>,
Kernel Team <Kernel-team@...com>
Subject: Re: [PATCH v2 bpf-next 3/7] bpf: Introduce function-by-function verification
On Thu, Jan 9, 2020 at 2:17 PM Alexei Starovoitov
<alexei.starovoitov@...il.com> wrote:
> > > +
> > > + ret = do_check(env);
> > > +out:
> > > + if (env->cur_state) {
> >
> > I think env->cur_state will never be NULL here. This check is necessary
> > before this patch (when we allocate cur_state in do_check()).
>
> yeah. good catch. 'if' can be dropped. I'll follow up with a clean up patch or
> will fold it if respin is necessary for other reasons.
that is the case of code review gone wrong.
This dropped 'if' during code move (because we both felt that it's unnecessary)
is the reason for syzbot panic under fault injection:
https://lore.kernel.org/lkml/00000000000048111c059cab1695@google.com/
I'm sending a fix for this shortly to restore that 'if' check.
This time adding a comment :)
Powered by blists - more mailing lists