refscale: Prevent hangs for invalid arguments
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 17 Sep 2020 17:37:10 +0000 (10:37 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Sat, 7 Nov 2020 01:13:51 +0000 (17:13 -0800)
commitbc80d353b3f565138cda7e95ed4020e6e69360b2
tree8a9b9610abd37c13642bb6287518d8383fd4b5ba
parent2f2214d43ccd27ac6d124287107c136a0f7c6053
refscale: Prevent hangs for invalid arguments

If an refscale 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 ref_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/refscale.c