]> 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)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 13 Sep 2021 23:36:16 +0000 (16:36 -0700)
commit5de2bbaa658d6736f7c7dfe10f5cfff5fff15773
treeca0266ea052c516cc2634505d08aae99cffa3c91
parentdae8a5f36ae84fc4d6973dacda97823ce96309c9
rcutorture: Don't cpuhp_remove_state() if cpuhp_setup_state() failed

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>
kernel/rcu/rcutorture.c