]> git.karo-electronics.de Git - karo-tx-linux.git/commit
tracing: Make sure rcu_irq_enter() can work for trace_*_rcuidle() trace events
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 7 Apr 2017 16:40:49 +0000 (12:40 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 10 Apr 2017 19:22:17 +0000 (15:22 -0400)
commitd54b6eeb553c89ed8d4c5a2ed73df374a45b9562
tree26ee9aadd39cb4f25fbd7f41e1adab23a51ccd35
parent03ecd3f48e57f2e6154584e0ee7450d7a05e2d3b
tracing: Make sure rcu_irq_enter() can work for trace_*_rcuidle() trace events

Stack tracing discovered that there's a small location inside the RCU
infrastructure where calling rcu_irq_enter() does not work. As trace events
use rcu_irq_enter() it must make sure that it is functionable. A check
against rcu_irq_enter_disabled() is added with a WARN_ON_ONCE() as no trace
event should ever be used in that part of RCU. If the warning is triggered,
then the trace event is ignored.

Restructure the __DO_TRACE() a bit to get rid of the prercu and postrcu,
and just have an rcucheck that does the work from within the _DO_TRACE()
macro. gcc optimization will compile out the rcucheck=0 case.

Link: http://lkml.kernel.org/r/20170405093207.404f8deb@gandalf.local.home
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
include/linux/tracepoint.h