diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 9b8d5dce946e6babc05d20ce139e09c7403b620a..10d018212bab8b1ad2f53e1ed388a4bbd56d4656 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c @@ -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 */