]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 24 Nov 2022 13:24:51 +0000 (14:24 +0100)
commit66c973c51578019fa9e1e63f5dd84b10ea5dc023
tree159f82e65a76c9691865cd9686a0a81a72d4c20c
parentf0c40e9326b8fa611e66e64b592b326e406c1108
rcu-tasks: Convert RCU_LOCKDEP_WARN() to WARN_ONCE()

BugLink: https://bugs.launchpad.net/bugs/1996825
[ Upstream commit fcd53c8a4dfa38bafb89efdd0b0f718f3a03f884 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
kernel/rcu/tasks.h