]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - kernel/locking/locktorture.c
locktorture: Prevent hangs for invalid arguments
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 18 Sep 2020 18:18:06 +0000 (11:18 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Sat, 7 Nov 2020 01:13:53 +0000 (17:13 -0800)
commit6b74fa0a776e3715d385b23d29db469179c825b0
tree3165750cf28d88eb305724d65968f86f79301652
parente5ace37d83af459bd491847df570b6763c602344
locktorture: Prevent hangs for invalid arguments

If an locktorture 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 lock_torture_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/locking/locktorture.c