summaryrefslogtreecommitdiffstats
path: root/kernel/rcu/rcutorture.c
diff options
context:
space:
mode:
authorAnna-Maria Behnsen <anna-maria@linutronix.de>2022-04-11 17:19:03 +0200
committerPaul E. McKenney <paulmck@kernel.org>2022-06-21 15:55:02 -0700
commit14c0017c19ead104511dbcf6a59b83b2456d09af (patch)
tree0328213c34709ec8df723cb771b23cccb27cbc4c /kernel/rcu/rcutorture.c
parentab69d3c8b99435ebd2ac4a241a5d931024c83c02 (diff)
downloadlinux-14c0017c19ead104511dbcf6a59b83b2456d09af.tar.gz
linux-14c0017c19ead104511dbcf6a59b83b2456d09af.tar.bz2
linux-14c0017c19ead104511dbcf6a59b83b2456d09af.zip
rcu/torture: Change order of warning and trace dump
Dumping a big ftrace buffer could lead to a RCU stall. So there is the ftrace buffer and the stall information which needs to be printed. When there is additionally a WARN_ON() which describes the reason for the ftrace buffer dump and the WARN_ON() is executed _after_ ftrace buffer dump, the information get lost in the middle of the RCU stall information. Therefore print WARN_ON() message before dumping the ftrace buffer in rcu_torture_writer(). [ paulmck: Add tracing_off() to avoid cruft from WARN(). ] Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de> Reviewed-by: Benedikt Spranger <b.spranger@linutronix.de> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu/rcutorture.c')
-rw-r--r--kernel/rcu/rcutorture.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 7120165a9342..3032dd7c7ad3 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -1321,8 +1321,9 @@ rcu_torture_writer(void *arg)
if (list_empty(&rcu_tortures[i].rtort_free) &&
rcu_access_pointer(rcu_torture_current) !=
&rcu_tortures[i]) {
- rcu_ftrace_dump(DUMP_ALL);
+ tracing_off();
WARN(1, "%s: rtort_pipe_count: %d\n", __func__, rcu_tortures[i].rtort_pipe_count);
+ rcu_ftrace_dump(DUMP_ALL);
}
if (stutter_waited)
sched_set_normal(current, oldnice);