Commit 0da938c4 authored by Steven Rostedt's avatar Steven Rostedt Committed by Ingo Molnar
Browse files

sched: Check if lowest_mask is initialized in find_lowest_rq()

On system boot up, the lowest_mask is initialized with an
early_initcall(). But RT tasks may wake up on other
early_initcall() callers before the lowest_mask is initialized,
causing a system crash.

Commit "d72bce0e

 rcu: Cure load woes" was the first commit
to wake up RT tasks in early init. Before this commit this bug
should not happen.
Reported-by: default avatarAndrew Theurer <>
Tested-by: default avatarAndrew Theurer <>
Tested-by: default avatarPaul E. McKenney <>
Signed-off-by: default avatarSteven Rostedt <>
Acked-by: default avatarPeter Zijlstra <>

Signed-off-by: default avatarIngo Molnar <>
parent 8dd0de8b
......@@ -1239,6 +1239,10 @@ static int find_lowest_rq(struct task_struct *task)
int this_cpu = smp_processor_id();
int cpu = task_cpu(task);
/* Make sure the mask is initialized first */
if (unlikely(!lowest_mask))
return -1;
if (task->rt.nr_cpus_allowed == 1)
return -1; /* No other targets possible */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment