summaryrefslogtreecommitdiff
path: root/scripts/const_structs.checkpatch
diff options
context:
space:
mode:
authorOnur Özkan <work@onurozkan.dev>2026-06-13 09:40:10 +0300
committerPaul E. McKenney <paulmck@kernel.org>2026-07-15 15:34:26 -0700
commit59cf3a5bda61cd3c300f0db952afcb031806e802 (patch)
treef113aa79d5f55dddf9b3e0dac1f734dce826f16b /scripts/const_structs.checkpatch
parent91d5185187e97611e328d03ee5e00e54b5d6d2b0 (diff)
downloadlinux-stable-59cf3a5bda61cd3c300f0db952afcb031806e802.tar.gz
linux-stable-59cf3a5bda61cd3c300f0db952afcb031806e802.zip
rust: sync: add SRCU abstraction
Add a Rust abstraction for sleepable RCU (SRCU), backed by C srcu_struct. Provide FFI helpers and a safe wrapper with a guard-based API for read-side critical sections. Cleanup is handled via `PinnedDrop`. It first checks for active read-side sections and emits a warning if any guards were leaked. In that case, it waits in `synchronize_srcu()` rather than risking a UAF by freeing the `srcu_struct` that is still reachable from the C side. It then uses `srcu_barrier()` to drain pending callbacks before finally calling `cleanup_srcu_struct()`. Signed-off-by: Onur Özkan <work@onurozkan.dev> Reviewed-by: Gary Guo <gary@garyguo.net> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Boqun Feng <boqun@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'scripts/const_structs.checkpatch')
0 files changed, 0 insertions, 0 deletions