summaryrefslogtreecommitdiffstats
path: root/kernel/rcu
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2018-07-07 17:35:22 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2018-08-29 09:20:48 -0700
commite746b558572efbad250e35e582a32ecabc9e9316 (patch)
treeb4a8500e2e8546ac1d3a4ddd48508be3c68853bc /kernel/rcu
parent444da518fd554eb1b9875dc97fac6ec249cee330 (diff)
downloadlinux-e746b558572efbad250e35e582a32ecabc9e9316.tar.gz
linux-e746b558572efbad250e35e582a32ecabc9e9316.tar.bz2
linux-e746b558572efbad250e35e582a32ecabc9e9316.zip
rcutorture: Warn on bad torture type for built-in tests
When running a built-in rcutorture test, specifying an invalid torture 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')
-rw-r--r--kernel/rcu/rcutorture.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 50a4f0ed4ebf..5df2411f7aee 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -1968,6 +1968,7 @@ rcu_torture_init(void)
for (i = 0; i < ARRAY_SIZE(torture_ops); i++)
pr_cont(" %s", torture_ops[i]->name);
pr_cont("\n");
+ WARN_ON(!IS_MODULE(CONFIG_RCU_TORTURE_TEST));
firsterr = -EINVAL;
goto unwind;
}