diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2021-07-19 21:52:12 +0300 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2021-08-06 23:41:49 +0300 |
commit | 521c89b3a4022269c75b35062358d1dae4ebfa79 (patch) | |
tree | 38ed225f1b20fe03e3f3641f03b7f0a599bb0e8d /kernel/rcu/tree_plugin.h | |
parent | 508958259bb3d9ca4ec37f0abdb211e9a6f3daa2 (diff) | |
download | linux-521c89b3a4022269c75b35062358d1dae4ebfa79.tar.xz |
rcu: Print human-readable message for schedule() in RCU reader
The WARN_ON_ONCE() invocation within the CONFIG_PREEMPT=y version of
rcu_note_context_switch() triggers when there is a voluntary context
switch in an RCU read-side critical section, but there is quite a gap
between the output of that WARN_ON_ONCE() and this RCU-usage error.
This commit therefore converts the WARN_ON_ONCE() to a WARN_ONCE()
that explicitly describes the problem in its message.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu/tree_plugin.h')
-rw-r--r-- | kernel/rcu/tree_plugin.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 83a702a4e296..e8b45ab72a79 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -346,7 +346,7 @@ void rcu_note_context_switch(bool preempt) trace_rcu_utilization(TPS("Start context switch")); lockdep_assert_irqs_disabled(); - WARN_ON_ONCE(!preempt && rcu_preempt_depth() > 0); + WARN_ONCE(!preempt && rcu_preempt_depth() > 0, "Voluntary context switch within RCU read-side critical section!"); if (rcu_preempt_depth() > 0 && !t->rcu_read_unlock_special.b.blocked) { |