tracing: Allow RCU to run between postponed startup tests
[linux-2.6-block.git] / kernel / trace / trace.c
index 3259019cc66d947e6ed989f600b029ee8ae8f452..4269af5905e4bf29880264b14fcf845d873843ab 100644 (file)
@@ -1722,6 +1722,10 @@ static __init int init_trace_selftests(void)
        pr_info("Running postponed tracer tests:\n");
 
        list_for_each_entry_safe(p, n, &postponed_selftests, list) {
+               /* This loop can take minutes when sanitizers are enabled, so
+                * lets make sure we allow RCU processing.
+                */
+               cond_resched();
                ret = run_tracer_selftest(p->type);
                /* If the test fails, then warn and remove from available_tracers */
                if (ret < 0) {