rcu_dereference_protected(9)
π¦ rcu_dereference_protected(9) π¦
okay so bestie, this page is from the Kernel API Manual β thatβs the manual-name vibe folded right in up top β and itβs literally all about rcu_dereference_protected. sheβs niche, sheβs kernel-core, and she has opinions about locks. periodt. π
πΈ NAME πΈ
rcu_dereference_protected β fetch RCU pointer when updates prevented. yes thatβs the whole name-line, but make it fashion. β¨
β¨ SYNOPSIS β¨
the signature is giving exactly this:
rcu_dereference_protected (p , c );
π ARGUMENTS π
pβ the pointer to read, prior to dereferencing. like, the pointer in question, bestie π«Άcβ the conditions under which the dereference will take place. the whole βunder what circumstances thoβ energy π¦
π DESCRIPTION π
Return the value of the specified RCU-protected pointer, but omit READ_ONCE. thatβs the move. This is useful in cases where update-side locks prevent the value of the pointer from changing. slay for update-side lock situations.
Please note that this primitive does not prevent the compiler from repeating this reference or combining it with other references, so it should not be used without protection of appropriate locks. like, do not rawdog this without the right locks, bestie β thatβs the warning. π
π¨ This function is only for update-side use. Using this function when protected only by rcu_read_lock will result in infrequent but very ugly failures. infrequent but VERY ugly β the worst kind of surprise. π
π SEE ALSO π
Kernel file: ./include/linux/rcupdate.h. and hereβs the whole link-up squad, no cap:
same_state_synchronize_rcu(9)cond_resched_tasks_rcu_qs(9)rcu_softirq_qs_periodic(9)RCU_LOCKDEP_WARN(9)lockdep_assert_in_rcu_read_lock(9)lockdep_assert_in_rcu_read_lock_bh(9)lockdep_assert_in_rcu_read_lock_sched(9)lockdep_assert_in_rcu_reader(9)unrcu_pointer(9)RCU_INITIALIZER(9)rcu_assign_pointer(9)rcu_replace_pointer(9)rcu_access_pointer(9)rcu_dereference_check(9)rcu_dereference_bh_check(9)rcu_dereference_sched_check(9)rcu_dereference_all_check(9)rcu_dereference(9)rcu_dereference_bh(9)rcu_dereference_sched(9)rcu_dereference_all(9)rcu_pointer_handoff(9)rcu_read_lock(9)rcu_read_unlock(9)rcu_read_lock_bh(9)rcu_read_unlock_bh(9)rcu_read_lock_sched(9)rcu_read_unlock_sched(9)RCU_INIT_POINTER(9)RCU_POINTER_INITIALIZER(9)kfree_rcu(9)kfree_rcu_mightsleep(9)kfree_rcu_nolock(9)rcu_head_init(9)rcu_head_after_call_rcu(9)
mwah π source/version is ./include/linux, date is October 2026, and this page is literally rcu_dereference_protected(9) signing off. bye bestie, stay locked and loaded. π«Άβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms