]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge branch 'bpf-nested-rcu-critical-sections'
authorAlexei Starovoitov <ast@kernel.org>
Sat, 22 Nov 2025 02:35:00 +0000 (18:35 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 22 Nov 2025 02:35:00 +0000 (18:35 -0800)
Puranjay Mohan says:

====================
bpf: Nested rcu critical sections

v1: https://lore.kernel.org/bpf/20250916113622.19540-1-puranjay@kernel.org/
Changes in v1->v2:
- Move the addition of new tests to a separate patch (Alexei)
- Avoid incrementing active_rcu_locks at two places (Eduard)

Support nested rcu critical sections by making the boolean flag
active_rcu_lock a counter and use it to manage rcu critical section
state. bpf_rcu_read_lock() increments this counter and
bpf_rcu_read_unlock() decrements it, MEM_RCU -> PTR_UNTRUSTED transition
happens when active_rcu_locks drops to 0.
====================

Link: https://patch.msgid.link/20251117200411.25563-1-puranjay@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

Trivial merge