All of lore.kernel.org
 help / color / mirror / Atom feed
From: oskar@gerlicz.space
To: mykyta.yatsenko5@gmail.com
Cc: bpf@vger.kernel.org, ast@kernel.org, andrii@kernel.org,
	daniel@iogearbox.net, kafai@meta.com, kernel-team@meta.com,
	eddyz87@gmail.com, memxor@gmail.com, yatsenko@meta.com
Subject: Re: [PATCH bpf-next v5 2/5] bpf: Add sleepable support for classic tracepoint programs
Date: Mon, 23 Mar 2026 22:26:54 +0100	[thread overview]
Message-ID: <7560779e22010c1907fe6045ef595d19@gerlicz.space> (raw)
In-Reply-To: <629d0324276759a1bda71248e93a99e2@gerlicz.space>

> +       if (unlikely(this_cpu_inc_return(bpf_prog_active) != 1)) {

Hi,

A question regarding the recursion handling.

Even with migrate_disable(), this still runs in a preemptible and
sleepable context. So if a task increments bpf_prog_active and then
sleeps, another task could run on the same CPU and also modify the
same per-CPU counter.

Would this interleaving affect recursion tracking correctness, or is
this accounted for?

Oskar Gerlicz Kowalczuk

  reply	other threads:[~2026-03-23 21:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23 21:17 [PATCH bpf-next v5 2/5] bpf: Add sleepable support for classic tracepoint programs oskar
2026-03-23 21:26 ` oskar [this message]
     [not found]   ` <e0443380-97d3-4bcc-b599-0883bb6c6a03@gmail.com>
2026-03-24 14:32     ` Mykyta Yatsenko
  -- strict thread matches above, loose matches on Subject: below --
2026-03-16 21:46 [PATCH bpf-next v5 0/5] bpf: Add support for sleepable " Mykyta Yatsenko
2026-03-16 21:46 ` [PATCH bpf-next v5 2/5] bpf: Add sleepable support for classic " Mykyta Yatsenko
2026-03-16 22:22   ` bot+bpf-ci
2026-03-23 20:38   ` Kumar Kartikeya Dwivedi
2026-03-23 20:57     ` Mykyta Yatsenko

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=7560779e22010c1907fe6045ef595d19@gerlicz.space \
    --to=oskar@gerlicz.space \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=kafai@meta.com \
    --cc=kernel-team@meta.com \
    --cc=memxor@gmail.com \
    --cc=mykyta.yatsenko5@gmail.com \
    --cc=yatsenko@meta.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.