rcu: Turn off tracing before dumping trace
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 31 Aug 2017 23:47:08 +0000 (16:47 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 9 Oct 2017 21:25:17 +0000 (14:25 -0700)
Currently, RCU allows tracing to continue when it automatically does
ftrace_dump() after detecting an error condition, which can result in
excessively large traces and lost trace events.  This commit therefore
does a tracing_off() before any of these ftrace_dump() calls.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/rcu.h

index e4b43fef89f5e12c5d4e0125d2500aff28bbde5f..b8729eb09a5dc62e7e3d75c84aaf6603a3a01568 100644 (file)
@@ -220,8 +220,10 @@ do { \
        static atomic_t ___rfd_beenhere = ATOMIC_INIT(0); \
        \
        if (!atomic_read(&___rfd_beenhere) && \
-           !atomic_xchg(&___rfd_beenhere, 1)) \
+           !atomic_xchg(&___rfd_beenhere, 1)) { \
+               tracing_off(); \
                ftrace_dump(oops_dump_mode); \
+       } \
 } while (0)
 
 void rcu_early_boot_tests(void);