public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Roman Gushchin <roman.gushchin@linux.dev>
To: Matt Bobrowski <mattbobrowski@google.com>
Cc: bpf@vger.kernel.org,  Alexei Starovoitov <ast@kernel.org>,
	 Daniel Borkmann <daniel@iogearbox.net>,
	 Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	 Eduard Zingerman <eddyz87@gmail.com>,
	 Song Liu <song@kernel.org>,
	 Yonghong Song <yonghong.song@linux.dev>,
	 ohn Fastabend <john.fastabend@gmail.com>,
	 KP Singh <kpsingh@kernel.org>,
	 Stanislav Fomichev <sdf@fomichev.me>,
	 Jiri Olsa <jolsa@kernel.org>
Subject: Re: [PATCH bpf-next] bpf: Revert "bpf: drop KF_ACQUIRE flag on BPF kfunc bpf_get_root_mem_cgroup()"
Date: Wed, 21 Jan 2026 10:47:57 -0800	[thread overview]
Message-ID: <87o6mm7qg2.fsf@linux.dev> (raw)
In-Reply-To: <20260121090001.240166-1-mattbobrowski@google.com> (Matt Bobrowski's message of "Wed, 21 Jan 2026 09:00:01 +0000")

Matt Bobrowski <mattbobrowski@google.com> writes:

> This reverts commit e463b6de9da1 ("bpf: drop KF_ACQUIRE flag on BPF
> kfunc bpf_get_root_mem_cgroup()").
>
> The original commit removed the KF_ACQUIRE flag from
> bpf_get_root_mem_cgroup() under the assumption that it resulted in
> simplified usage. This stemmed from the fact that
> bpf_get_root_mem_cgroup() inherently returns a reference to an object
> which technically isn't reference counted, therefore there is no
> strong requirement to call a matching bpf_put_mem_cgroup() on the
> returned reference.
>
> Although technically correct, as per the arguments in the thread [0],
> dropping the KF_ACQUIRE flag and losing reference tracking semantics
> negatively impacted the usability of bpf_get_root_mem_cgroup() in
> practice.
>
> [0] https://lore.kernel.org/bpf/878qdx6yut.fsf@linux.dev/
>
> Link: https://lore.kernel.org/bpf/CAADnVQ+6d1Lj4dteAv8u62d7kj3Ze5io6bqM0xeQd-UPk9ZgJQ@mail.gmail.com/
> Signed-off-by: Matt Bobrowski <mattbobrowski@google.com>

Acked-by: Roman Gushchin <roman.gushchin@linux.dev>

Thanks, Matt!

      parent reply	other threads:[~2026-01-21 18:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-21  9:00 [PATCH bpf-next] bpf: Revert "bpf: drop KF_ACQUIRE flag on BPF kfunc bpf_get_root_mem_cgroup()" Matt Bobrowski
2026-01-21 17:50 ` patchwork-bot+netdevbpf
2026-01-21 18:47 ` Roman Gushchin [this message]

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=87o6mm7qg2.fsf@linux.dev \
    --to=roman.gushchin@linux.dev \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mattbobrowski@google.com \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /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