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 <habanero@linux.vnet.ibm.com>
Tested-by: default avatarAndrew Theurer <habanero@linux.vnet.ibm.com>
Tested-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20110614223657.824872966@goodmis.org

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
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