@@ -1766,7 +1766,38 @@ static int rcu_tasks_verify_self_tests(void)
{
int ret = 0;
int i;
+ int delay = 0;
+
+ for (i = 0; i < ARRAY_SIZE(tests); i++) {
+ if (!tests[i].notrun) { // still hanging.
+ ret = -1;
+ }
+ }
+
+ if (!ret)
+ return ret;
+
+#ifdef CONFIG_TASKS_RCU
+ delay = rcu_tasks.gp_sleep;
+ if (delay < rcu_tasks.init_fract)
+ delay = rcu_tasks.init_fract;
+#endif
+
+#ifdef CONFIG_TASKS_RUDE_RCU
+ if (delay < rcu_tasks_rude.gp_sleep)
+ delay = rcu_tasks_rude.gp_sleep;
+#endif
+
+#ifdef CONFIG_TASKS_TRACE_RCU
+ if (delay < rcu_tasks_trace.gp_sleep)
+ delay = rcu_tasks_trace.gp_sleep;
+ if (delay < rcu_tasks_trace.init_fract)
+ delay = rcu_tasks_trace.init_fract;
+#endif
+ pr_info("wait extra %d jiffies for rcu tasks self tests\n", 2*delay);
+ schedule_timeout_uninterruptible(2*delay);
+
+ ret = 0;
for (i = 0; i < ARRAY_SIZE(tests); i++) {
if (!tests[i].notrun) { // still hanging.
--