rcuscale: Prevent hangs for invalid arguments
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 17 Sep 2020 17:30:46 +0000 (10:30 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Sat, 7 Nov 2020 01:13:51 +0000 (17:13 -0800)
commit2f2214d43ccd27ac6d124287107c136a0f7c6053
treea433d5d93ed28074472e1ef56456f4d043b0c73d
parent8d68e68a781db80606c8e8f3e4383be6974878fd
rcuscale: Prevent hangs for invalid arguments

If an rcuscale torture-test run is given a bad kvm.sh argument, the
test will complain to the console, which is good.  What is bad is that
from the user's perspective, it will just hang for the time specified
by the --duration argument.  This commit therefore forces an immediate
kernel shutdown if a rcu_scale_init()-time error occurs, thus avoiding
the appearance of a hang.  It also forces a console splat in this case
to clearly indicate the presence of an error.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/rcuscale.c