[RFC][PATCH] tracing: Have stack tracer force RCU to be watching

From: Steven Rostedt
Date: Tue Oct 20 2015 - 12:10:40 EST



Paul,

I've spent a couple of days debugging this, and finally found that my
stack tracer was calling the stack trace code, which calls
__module_address() which asserts the below.

Is just calling rcu_irq_enter() and rcu_irq_exit() safe to do
everywhere (with interrupts always disabled)? This patch appears to fix
the bug.

Peter,

I'm going to be sending a second patch that converts that from a
WARN_ON() to an open coded WARN_ON_ONCE(), because WARN_ON() also calls
the stack trace code which calls __module_address() and we end up with
an infinite warning about it. This prevented me from seeing where the
bug actually was, and crashed the box.

-- Steve