Message ID | 20230528051742.1325503-3-rostedt@goodmis.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 9da705d432a07927526005a0688d81fbbf30e349 |
Headers | show |
Series | tracing: Fix selftests softlockup issues | expand |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 87e5920b141f..70f2b511b9cd 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -2045,6 +2045,13 @@ static int do_run_tracer_selftest(struct tracer *type) { int ret; + /* + * Tests can take a long time, especially if they are run one after the + * other, as does happen during bootup when all the tracers are + * registered. This could cause the soft lockup watchdog to trigger. + */ + cond_resched(); + tracing_selftest_running = true; ret = run_tracer_selftest(type); tracing_selftest_running = false;