]> git.baikalelectronics.ru Git - kernel.git/commit
rcu-tasks: Convert RCU_LOCKDEP_WARN() to WARN_ONCE()
authorZqiang <qiang1.zhang@intel.com>
Tue, 12 Jul 2022 08:26:05 +0000 (16:26 +0800)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 31 Aug 2022 12:10:54 +0000 (05:10 -0700)
commite6ae4253badb2be999d567e2c9d475376dc9a7dd
treeb73fd3e1a6f13feff359aa539c4300e2329f09eb
parent34a3249ab33a1690f58cd6e91a0208887337d3e0
rcu-tasks: Convert RCU_LOCKDEP_WARN() to WARN_ONCE()

Kernels built with CONFIG_PROVE_RCU=y and CONFIG_DEBUG_LOCK_ALLOC=y
attempt to emit a warning when the synchronize_rcu_tasks_generic()
function is called during early boot while the rcu_scheduler_active
variable is RCU_SCHEDULER_INACTIVE.  However the warnings is not
actually be printed because the debug_lockdep_rcu_enabled() returns
false, exactly because the rcu_scheduler_active variable is still equal
to RCU_SCHEDULER_INACTIVE.

This commit therefore replaces RCU_LOCKDEP_WARN() with WARN_ONCE()
to force these warnings to actually be printed.

Signed-off-by: Zqiang <qiang1.zhang@intel.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tasks.h