Re: [PATCH bpf-next v2 8/8] bpf: Exercise syscall operations for inode and sk storage

From: KP Singh
Date: Tue Nov 03 2020 - 17:58:41 EST


On Tue, Nov 3, 2020 at 11:32 PM Song Liu <songliubraving@xxxxxx> wrote:
>
>
>
> > On Nov 3, 2020, at 7:31 AM, KP Singh <kpsingh@xxxxxxxxxxxx> wrote:
> >
> > From: KP Singh <kpsingh@xxxxxxxxxx>
>
> A short commit log would be great...

Sure :) No excuses for not having one, will add it in the next revision.

- KP

[...]

> > + serv_sk))
> > + goto close_prog;
>
> We shouldn't need this goto, otherwise we may leak serv_sk.

Good point, I will just move the close(serv_sk); along with the other
descriptor clean up.

>
> > +
> > close(serv_sk);
> >
> > close_prog:
> > + close(rm_fd);
> > close(task_fd);
> > local_storage__destroy(skel);
> > }
> > --
> > 2.29.1.341.ge80a0c044ae-goog
> >
>