path: root/kernel/rcu/update.c
diff options
authorPaul E. McKenney <>2014-06-19 14:57:10 -0700
committerPaul E. McKenney <>2014-06-23 11:19:29 -0700
commit546a9d8519ed137b2804a3f5a3659003039dd49c (patch)
tree1f4c679c28b2980e08bc1d0bb8c0b01dc6d98247 /kernel/rcu/update.c
parent7171511eaec5bf23fb06078f59784a3a0626b38f (diff)
rcu: Export debug_init_rcu_head() and and debug_init_rcu_head()
Currently, call_rcu() relies on implicit allocation and initialization for the debug-objects handling of RCU callbacks. If you hammer the kernel hard enough with Sasha's modified version of trinity, you can end up with the sl*b allocators recursing into themselves via this implicit call_rcu() allocation. This commit therefore exports the debug_init_rcu_head() and debug_rcu_head_free() functions, which permits the allocators to allocated and pre-initialize the debug-objects information, so that there no longer any need for call_rcu() to do that initialization, which in turn prevents the recursion into the memory allocators. Reported-by: Sasha Levin <> Suggested-by: Thomas Gleixner <> Signed-off-by: Paul E. McKenney <> Acked-by: Thomas Gleixner <> Looks-good-to: Christoph Lameter <>
Diffstat (limited to 'kernel/rcu/update.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index a2aeb4df0f60..0fb691e63ce6 100644
--- a/kernel/rcu/update.c
+++ b/kernel/rcu/update.c
@@ -200,12 +200,12 @@ void wait_rcu_gp(call_rcu_func_t crf)
-static inline void debug_init_rcu_head(struct rcu_head *head)
+void init_rcu_head(struct rcu_head *head)
debug_object_init(head, &rcuhead_debug_descr);
-static inline void debug_rcu_head_free(struct rcu_head *head)
+void destroy_rcu_head(struct rcu_head *head)
debug_object_free(head, &rcuhead_debug_descr);