lockdep_asse...n_rcu_reader(9)
π lockdep_asse...n_rcu_reader β Kernel API Manual β¨
okay so bestie, welcome to the lockdep_asse...n_rcu_reader(9) page, she's a tiny little kernel-API icon and honestly? kind of a vibe. Let's get into it π«Ά
πΈ NAME πΈ
lockdep_assert_in_rcu_reader β literally just WARNs at you if you're not inside some type of RCU reader π
π¦ SYNOPSIS π¦
lockdep_assert_in_rcu_reader
that's it. that's the whole call. no args, no drama, she's a macro and she knows it π
π DESCRIPTION π
So here's the tea π β she splats if lockdep is enabled and there is no RCU reader of any type in effect. Like, zero. none. not even one. and she will make it known.
and like, don't be fooled into thinking "RCU reader" only means the obvious ones, because regions of code protected by things like preempt_disable, local_bh_disable, and local_irq_disable all qualify as RCU readers β¨ so if you're chilling in one of those, you're covered, you're valid, you're slaying π
β οΈ also important, ngl: this will never trigger inPREEMPT_NONEorPREEMPT_VOLUNTARYkernels that are not also built withPREEMPT_COUNT. so she's lowkey asleep in those configs π but like β if you already have lockdep enabled, you might as well also enablePREEMPT_COUNT. fr fr, just do it, it costs you nothing and gets you the whole check π
π SEE ALSO π
the whole girl squad lives in the kernel file ./include/linux/rcupdate.h and honestly this list is long, so buckle up bestie π:
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)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_protected(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)
and that's the page babes π she lives in ./include/linux, she's stamped October 2026, and she answers to the name lockdep_asse...n_rcu_reader(9). go be an RCU reader, ily, mwah π§π
π¦ 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