kfree_rcu_mightsleep(9)
π kfree_rcu_mightsleep π
okay so this page lives in the Kernel API Manual, section 9 (that's the kernel API girlies, iykyk) π
β¨ NAME β¨
kfree_rcu_mightsleep β literally kfree an object after a grace period. that's it, that's the vibe π
π¦ SYNOPSIS π¦
kfree_rcu_mightsleep (ptr );
πΈ ARGUMENTS πΈ
ptrβ pointer tokfreefor single-argument invocations. bestie it's just a pointer, one singular argument, that's the whole thing π«Ά
π₯ DESCRIPTION π₯
ok so when we're talking about the head-less variant, only ONE argument gets passed, and it's just a pointer that has to be freed after a grace period. so the semantic is literally:
kfree_rcu_mightsleep(ptr);
where ptr is the pointer to be freed by kvfree. no cap π
β οΈ please note, bestie: the head-less way of freeing is permitted to be used from a context that has to follow themight_sleepannotation. otherwise, please switch and embed thercu_headstructure within the type ofptr. π don't skip this, fr fr
π SEE ALSO π
yesss the reference list, and it is LONG, so buckle up gorgeous πβ¨
The kernel file ./include/linux/rcupdate.h, plus:
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_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_nolock(9)rcu_head_init(9)rcu_head_after_call_rcu(9)
like, she knows EVERYONE. main character energy fr ππ¦
and that's the whole page, babe π this cutie came from ./include/linux and it's dated October 2026 β slay, see you in the group chat β¨ππ«Ά
π¦ 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