[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQK_LWcafdVwB+7aFr2Ow3yOd03e8D6-d13JbMB8=a+QQw@mail.gmail.com>
Date: Tue, 26 Oct 2021 10:54:53 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Shuah Khan <skhan@...uxfoundation.org>
Cc: Andrea Righi <andrea.righi@...onical.com>,
Shuah Khan <shuah@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...nel.org>,
Andrii Nakryiko <andrii@...nel.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] selftests/bpf: fix fclose/pclose mismatch
On Tue, Oct 26, 2021 at 10:47 AM Shuah Khan <skhan@...uxfoundation.org> wrote:
>
> On 10/26/21 8:34 AM, Andrea Righi wrote:
> > Make sure to use pclose() to properly close the pipe opened by popen().
> >
> > Fixes: 81f77fd0deeb ("bpf: add selftest for stackmap with BPF_F_STACK_BUILD_ID")
> > Signed-off-by: Andrea Righi <andrea.righi@...onical.com>
> > ---
> > tools/testing/selftests/bpf/test_progs.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c
> > index cc1cd240445d..e3fea6f281e4 100644
> > --- a/tools/testing/selftests/bpf/test_progs.c
> > +++ b/tools/testing/selftests/bpf/test_progs.c
> > @@ -370,7 +370,7 @@ int extract_build_id(char *build_id, size_t size)
> >
> > if (getline(&line, &len, fp) == -1)
> > goto err;
> > - fclose(fp);
> > + pclose(fp);
> >
> > if (len > size)
> > len = size;
> > @@ -379,7 +379,7 @@ int extract_build_id(char *build_id, size_t size)
> > free(line);
> > return 0;
> > err:
> > - fclose(fp);
> > + pclose(fp);
> > return -1;
> > }
> >
> >
>
> Thank you for the patch. The return logic could be simpler
> doing out handling common for error and success path with
> just one call to close. Not related to this change though.
>
> Adding bpf maintainers to the thread
Ohh. That's odd.
I see the patch in:
https://patchwork.kernel.org/project/netdevbpf/list/?delegate=121173
but not in my gmail.
vger is probably slow.
Powered by blists - more mailing lists