diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 420e80e56e55..9fea72f19d85 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h @@ -156,11 +156,11 @@ TRACE_EVENT(sched_switch, TP_fast_assign( memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN); __entry->prev_pid = prev->pid; - __entry->prev_prio = prev->prio; + __entry->prev_prio = prev->prio == -1 ? 150 : prev->prio; __entry->prev_state = __trace_sched_switch_state(preempt, prev); memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); __entry->next_pid = next->pid; - __entry->next_prio = next->prio; + __entry->next_prio = next->prio == -1 ? 150 : next->prio; /* XXX SCHED_DEADLINE */ ),