rcu: Fix dyntick-idle tracing
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 5 Apr 2017 16:05:18 +0000 (09:05 -0700)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 10 Apr 2017 19:21:57 +0000 (15:21 -0400)
commita278d4718988a253a08d12e6d76c80979693d39e
tree37918ca0a265f5811bc57617a38fd1c1123989b5
parent8aaf1ee70e19ac74cbbb81098edfa328d1ab4bd7
rcu: Fix dyntick-idle tracing

The tracing subsystem started using rcu_irq_entry() and rcu_irq_exit()
(with my blessing) to allow the current _rcuidle alternative tracepoint
name to be dispensed with while still maintaining good performance.
Unfortunately, this causes RCU's dyntick-idle entry code's tracing to
appear to RCU like an interrupt that occurs where RCU is not designed
to handle interrupts.

This commit fixes this problem by moving the zeroing of ->dynticks_nesting
after the offending trace_rcu_dyntick() statement, which narrows the
window of vulnerability to a pair of adjacent statements that are now
marked with comments to that effect.

Link: http://lkml.kernel.org/r/20170405093207.404f8deb@gandalf.local.home
Link: http://lkml.kernel.org/r/20170405193928.GM1600@linux.vnet.ibm.com
Reported-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/rcu/tree.c