locktorture: Warn on individual lock_torture_init() error conditions
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 5 Aug 2021 22:53:10 +0000 (15:53 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 13 Sep 2021 23:36:16 +0000 (16:36 -0700)
commitb3b3cc618ee07f5f4c409e8ca86ac7fbac085ebd
treee9669e441d6801e9dc08636c36f78a3af7ea41c9
parentefeff6b39b9de4480572c7b0c5eb77204795cb57
locktorture: Warn on individual lock_torture_init() error conditions

When running locktorture as a module, any lock_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 locktorture
built-in, for example, when using the kvm.sh script.  This commit
therefore adds WARN_ON_ONCE() to allow distinguishing lock_torture_init()
errors when running locktorture built-in.

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