BPF List
 help / color / mirror / Atom feed
* [PATCH bpf 0/3] bpf: Fix objects stuck in free_by_rcu_ttrace
@ 2026-09-30  9:59 Alexei Starovoitov
  2026-09-30  9:59 ` [PATCH bpf 1/3] bpf: Factor out __do_call_rcu_ttrace() Alexei Starovoitov
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Alexei Starovoitov @ 2026-09-30  9:59 UTC (permalink / raw)
  To: bpf; +Cc: daniel, andrii, eddyz87, memxor

From: Alexei Starovoitov <ast@kernel.org>

The objects that bpf_mem_alloc frees while RCU tasks trace GP is in flight
stay in free_by_rcu_ttrace list until the same bpf_mem_cache frees or
allocates in bulk again.

Patch 1 - refactoring. No functional change.
Patch 2 - the fix.
Patch 3 - selftest.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>

Alexei Starovoitov (3):
  bpf: Factor out __do_call_rcu_ttrace()
  bpf: Fix objects stuck in free_by_rcu_ttrace
  selftests/bpf: Add a test for objects stuck in free_by_rcu_ttrace

 kernel/bpf/memalloc.c                         | 57 ++++++++++++++----
 .../selftests/bpf/prog_tests/bpf_ma_ttrace.c  | 60 +++++++++++++++++++
 .../selftests/bpf/progs/bpf_ma_ttrace.c       | 50 ++++++++++++++++
 3 files changed, 157 insertions(+), 10 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/bpf_ma_ttrace.c
 create mode 100644 tools/testing/selftests/bpf/progs/bpf_ma_ttrace.c

-- 
2.55.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-01 16:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-30  9:59 [PATCH bpf 0/3] bpf: Fix objects stuck in free_by_rcu_ttrace Alexei Starovoitov
2026-09-30  9:59 ` [PATCH bpf 1/3] bpf: Factor out __do_call_rcu_ttrace() Alexei Starovoitov
2026-09-30  9:59 ` [PATCH bpf 2/3] bpf: Fix objects stuck in free_by_rcu_ttrace Alexei Starovoitov
2026-09-30  9:59 ` [PATCH bpf 3/3] selftests/bpf: Add a test for " Alexei Starovoitov
2026-10-01 16:50 ` [PATCH bpf 0/3] bpf: Fix " patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox