lkml.org 
[lkml]   [2021]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH bpf-next v3 1/6] bpf: Factorize bpf_trace_printk and bpf_seq_printf
    On Wed, Apr 14, 2021 at 11:56 AM Florent Revest <revest@chromium.org> wrote:
    > On Wed, Apr 14, 2021 at 1:01 AM Andrii Nakryiko
    > <andrii.nakryiko@gmail.com> wrote:
    > > On Mon, Apr 12, 2021 at 8:38 AM Florent Revest <revest@chromium.org> wrote:
    > > > + err = 0;
    > > > +out:
    > > > + put_fmt_tmp_buf();
    > >
    > > so you are putting tmp_buf unconditionally, even when there was no
    > > error. That seems wrong? Should this be:
    > >
    > > if (err)
    > > put_fmt_tmp_buf()
    > >
    > > ?
    >
    > Yeah the naming is unfortunate, as discussed in the other patch, I
    > will rename that to bpf_pintf_cleanup instead. It's not clear from the
    > name that it only "puts" if the buffer was already gotten.

    Ah, sorry I see what you meant! Indeed, my mistake. :|

    \
     
     \ /
      Last update: 2021-04-14 12:58    [W:3.850 / U:0.916 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site