On Thu, 2 May 2019 at 17:03, Martin Lau wrote:
>
> On Thu, May 02, 2019 at 11:49:32AM -0400, Lorenz Bauer wrote:
> > Currently, code like the following segfaults if bpf_prog_load_xattr
> > returns an error:
> >
> > struct bpf_object *obj;
> >
> > err = bpf_prog_load_xattr(&attr, &obj, &pro
On Thu, May 02, 2019 at 11:49:32AM -0400, Lorenz Bauer wrote:
> Currently, code like the following segfaults if bpf_prog_load_xattr
> returns an error:
>
> struct bpf_object *obj;
>
> err = bpf_prog_load_xattr(&attr, &obj, &prog_fd);
> bpf_object__close(obj);
This is a bug. err shoul
Currently, code like the following segfaults if bpf_prog_load_xattr
returns an error:
struct bpf_object *obj;
err = bpf_prog_load_xattr(&attr, &obj, &prog_fd);
bpf_object__close(obj);
if (err)
...
Unconditionally reset pobj to NULL at the start of the function
to fix this