--- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -1564,7 +1564,11 @@ static int trace_save_cmdline(struct tas { unsigned pid, idx; - if (!tsk->pid || unlikely(tsk->pid > PID_MAX_DEFAULT)) + /* treat recording of idle task as a success */ + if (!tsk->pid) + return 1; + + if (unlikely(tsk->pid > PID_MAX_DEFAULT)) return 0; /*