summaryrefslogtreecommitdiffstats
path: root/kernel/rcu/rcuperf.c
diff options
context:
space:
mode:
authorPaul E. McKenney2018-07-08 03:26:50 +0200
committerPaul E. McKenney2018-08-29 18:20:48 +0200
commitf0288064425ff9a5e05c8c0fdba6ec7681dd3330 (patch)
treee832caa7582daec6284398ff4d4b6f720e22fc8b /kernel/rcu/rcuperf.c
parentrcutorture: Warn on bad torture type for built-in tests (diff)
downloadkernel-qcow2-linux-f0288064425ff9a5e05c8c0fdba6ec7681dd3330.tar.gz
kernel-qcow2-linux-f0288064425ff9a5e05c8c0fdba6ec7681dd3330.tar.xz
kernel-qcow2-linux-f0288064425ff9a5e05c8c0fdba6ec7681dd3330.zip
rcuperf: Warn on bad perf type for built-in tests
When running a built-in rcuperf test, specifying an invalid perf type results in what looks like a hard hang, with the error messages hidden by other boot-time output. This commit therefore executes a WARN_ON() in this case so that the splat appears just following the error messages. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu/rcuperf.c')
-rw-r--r--kernel/rcu/rcuperf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/rcu/rcuperf.c b/kernel/rcu/rcuperf.c
index 34244523550e..832ce68fd45f 100644
--- a/kernel/rcu/rcuperf.c
+++ b/kernel/rcu/rcuperf.c
@@ -680,6 +680,7 @@ rcu_perf_init(void)
for (i = 0; i < ARRAY_SIZE(perf_ops); i++)
pr_cont(" %s", perf_ops[i]->name);
pr_cont("\n");
+ WARN_ON(!IS_MODULE(CONFIG_RCU_PERF_TEST));
firsterr = -EINVAL;
goto unwind;
}