tracing: Remove RCU work arounds from stack tracer

Currently the stack tracer calls rcu_irq_enter() to make sure RCU
is watching when it records a stack trace. But if the stack tracer
is triggered while tracing inside of a rcu_irq_enter(), calling
rcu_irq_enter() unconditionally can be problematic.

The reason for having rcu_irq_enter() in the first place has been
fixed from within the saving of the stack trace code, and there's no
reason for doing it in the stack tracer itself. Just remove it.

Fixes: 0be964be ("module: Sanitize RCU usage and locking")
Acked-by: default avatarPaul E. McKenney <>
Suggested-by: default avatar"Paul E. McKenney" <>
Signed-off-by: default avatarSteven Rostedt (VMware) <>
parent e8cac8b1
......@@ -96,23 +96,9 @@ check_stack(unsigned long ip, unsigned long *stack)
if (in_nmi())
* There's a slight chance that we are tracing inside the
* RCU infrastructure, and rcu_irq_enter() will not work
* as expected.
if (unlikely(rcu_irq_enter_disabled()))
* RCU may not be watching, make it see us.
* The stack trace code uses rcu_sched.
/* In case another CPU set the tracer_frame on us */
if (unlikely(!frame_size))
this_size -= tracer_frame;
......@@ -205,7 +191,6 @@ check_stack(unsigned long ip, unsigned long *stack)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment