rcutorture: Warn on individual rcu_torture_init() error conditions
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 5 Aug 2021 20:28:24 +0000 (13:28 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:22 +0000 (14:23 +0200)
commit5a6ff3e32a0c3a1e87c6b08eb62d650a992b4062
tree53e3445d7168567496704b5750da5906ad029e5e
parente32f8c51a6506f80699fd3eb72c59d6f102da41e
rcutorture: Warn on individual rcu_torture_init() error conditions

[ Upstream commit efeff6b39b9de4480572c7b0c5eb77204795cb57 ]

When running rcutorture as a module, any rcu_torture_init() issues will be
reflected in the error code from modprobe or insmod, as the case may be.
However, these error codes are not available when running rcutorture
built-in, for example, when using the kvm.sh script.  This commit
therefore adds WARN_ON_ONCE() to allow distinguishing rcu_torture_init()
errors when running rcutorture built-in.

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