]> git.baikalelectronics.ru Git - kernel.git/commit
rcutorture: Don't cpuhp_remove_state() if cpuhp_setup_state() failed
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 6 Aug 2021 15:57:26 +0000 (08:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:22 +0000 (14:23 +0200)
commita6542ea81c968244d898fb2299ee9a86971c48c0
tree77350b6ae9567462396dedac6b393f7dcb7ff269
parent0a200ad1644dd6283918cff6c91784af85300e88
rcutorture: Don't cpuhp_remove_state() if cpuhp_setup_state() failed

[ Upstream commit 5de2bbaa658d6736f7c7dfe10f5cfff5fff15773 ]

Currently, in CONFIG_RCU_BOOST kernels, if the rcu_torture_init()
function's call to cpuhp_setup_state() fails, rcu_torture_cleanup()
gamely passes nonsense to cpuhp_remove_state().  This results in
strange and misleading splats.  This commit therefore ensures that if
the rcu_torture_init() function's call to cpuhp_setup_state() fails,
rcu_torture_cleanup() avoids invoking cpuhp_remove_state().

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/rcu/rcutorture.c