]> git.baikalelectronics.ru Git - kernel.git/commit
cpuidle: lib/bug: Disable rcu_is_watching() during WARN/BUG
authorPeter Zijlstra <peterz@infradead.org>
Thu, 26 Jan 2023 15:08:31 +0000 (16:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:47 +0000 (09:33 +0100)
commitbf206907c53de0cb98b17c66195f06d80c335a57
tree00bdefbcb51a7c2086bc70676a1c403e995d0ea4
parentf60ab91b6a38cb96120bac4e89169e37e4798a43
cpuidle: lib/bug: Disable rcu_is_watching() during WARN/BUG

[ Upstream commit 6f63dbfd76c3b5f3ed6feda6e3f5cdaec0002a22 ]

In order to avoid WARN/BUG from generating nested or even recursive
warnings, force rcu_is_watching() true during
WARN/lockdep_rcu_suspicious().

Notably things like unwinding the stack can trigger rcu_dereference()
warnings, which then triggers more unwinding which then triggers more
warnings etc..

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20230126151323.408156109@infradead.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/context_tracking.h
kernel/locking/lockdep.c
kernel/panic.c
lib/bug.c