From: Martin KaFai Lau <martin.lau@linux.dev>
To: Amery Hung <ameryhung@gmail.com>
Cc: bpf@vger.kernel.org, daniel@iogearbox.net, andrii@kernel.org,
alexei.starovoitov@gmail.com, martin.lau@kernel.org,
eddyz87@gmail.com, kernel-team@meta.com
Subject: Re: [PATCH bpf-next v1 1/5] bpf: Make every prog keep a copy of ctx_arg_info
Date: Fri, 14 Feb 2025 16:20:56 -0800 [thread overview]
Message-ID: <4f9df8f0-114f-4448-ba3e-66273a225b0b@linux.dev> (raw)
In-Reply-To: <20250214164520.1001211-2-ameryhung@gmail.com>
On 2/14/25 8:45 AM, Amery Hung wrote:
> diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
> index c420edbfb7c8..598f19e6ebd2 100644
> --- a/kernel/bpf/syscall.c
> +++ b/kernel/bpf/syscall.c
> @@ -2315,6 +2315,8 @@ static void __bpf_prog_put_noref(struct bpf_prog *prog, bool deferred)
> kfree(prog->aux->kfunc_tab);
> if (prog->aux->attach_btf)
> btf_put(prog->aux->attach_btf);
> + if (prog->aux->ctx_arg_info)
A small nit. NULL check is not needed.
Acked-by: Martin KaFai Lau <martin.lau@kernel.org>
> + kfree(prog->aux->ctx_arg_info);
next prev parent reply other threads:[~2025-02-15 0:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-14 16:45 [PATCH bpf-next v1 0/5] Extend struct_ops support for operators Amery Hung
2025-02-14 16:45 ` [PATCH bpf-next v1 1/5] bpf: Make every prog keep a copy of ctx_arg_info Amery Hung
2025-02-15 0:20 ` Martin KaFai Lau [this message]
2025-02-15 2:41 ` Alexei Starovoitov
2025-02-15 4:39 ` Amery Hung
2025-02-14 16:45 ` [PATCH bpf-next v1 2/5] bpf: Support getting referenced kptr from struct_ops argument Amery Hung
2025-02-15 0:49 ` Martin KaFai Lau
2025-02-15 2:48 ` Alexei Starovoitov
2025-02-15 4:58 ` Amery Hung
2025-02-14 16:45 ` [PATCH bpf-next v1 3/5] selftests/bpf: Test referenced kptr arguments of struct_ops programs Amery Hung
2025-02-15 1:14 ` Martin KaFai Lau
2025-02-15 4:30 ` Amery Hung
2025-02-14 16:45 ` [PATCH bpf-next v1 4/5] bpf: Allow struct_ops prog to return referenced kptr Amery Hung
2025-02-15 1:42 ` Martin KaFai Lau
2025-02-14 16:45 ` [PATCH bpf-next v1 5/5] selftests/bpf: Test returning referenced kptr from struct_ops programs Amery Hung
2025-02-15 1:52 ` Martin KaFai Lau
2025-02-15 2:09 ` [PATCH bpf-next v1 0/5] Extend struct_ops support for operators Martin KaFai Lau
2025-02-18 22:20 ` Amery Hung
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4f9df8f0-114f-4448-ba3e-66273a225b0b@linux.dev \
--to=martin.lau@linux.dev \
--cc=alexei.starovoitov@gmail.com \
--cc=ameryhung@gmail.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=kernel-team@meta.com \
--cc=martin.lau@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox