[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250801115649.0b31f582@gandalf.local.home>
Date: Fri, 1 Aug 2025 11:56:49 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Tomas Glozar <tglozar@...hat.com>
Cc: Alexei Starovoitov <alexei.starovoitov@...il.com>, LKML
<linux-kernel@...r.kernel.org>, Linux Trace Kernel
<linux-trace-kernel@...r.kernel.org>, bpf <bpf@...r.kernel.org>, Masami
Hiramatsu <mhiramat@...nel.org>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko
<andrii@...nel.org>, Jiri Olsa <jolsa@...nel.org>, Martin KaFai Lau
<martin.lau@...ux.dev>, Eduard Zingerman <eddyz87@...il.com>, Song Liu
<song@...nel.org>, KP Singh <kpsingh@...nel.org>
Subject: Re: [PATCH] btf: Simplify BTF logic with use of __free(btf_put)
On Fri, 1 Aug 2025 17:34:51 +0200
Tomas Glozar <tglozar@...hat.com> wrote:
> pá 1. 8. 2025 v 17:29 odesílatel Alexei Starovoitov
> <alexei.starovoitov@...il.com> napsal:
> >
> > but __free() is imo garbage. It's essence of what's wrong with C++
> >
>
> Here, you at least can read the beginning of the function though, and
> see that a free will be done at the end, like Go's defer, right?
I don't know Go, but I'll assume "yes".
I prefer the __free() over goto end; where you need to free up a temporary
variable on error paths.
But regardless. This will just be a difference of opinion, and I respect
that Alexei doesn't want to use it in his code.
-- Steve
Powered by blists - more mailing lists