summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-06-15 21:45:18 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-06-15 21:45:18 -0700
commita1b6ae8ed01736dae19a33e74ea4e8dd88f891b5 (patch)
tree62019061cacdc90ba1454a8f9d227acbd7a64cde
parent21c5977a836e399fc710ff2c5367845ed5c2527f (diff)
parent0da938c44921cfb690283d3b0c9c48a10375db2c (diff)
downloadop-kernel-dev-a1b6ae8ed01736dae19a33e74ea4e8dd88f891b5.zip
op-kernel-dev-a1b6ae8ed01736dae19a33e74ea4e8dd88f891b5.tar.gz
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: Check if lowest_mask is initialized in find_lowest_rq() sched: Fix need_resched() when checking peempt
-rw-r--r--kernel/sched_rt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 88725c9..10d0182 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -1096,7 +1096,7 @@ static void check_preempt_curr_rt(struct rq *rq, struct task_struct *p, int flag
* to move current somewhere else, making room for our non-migratable
* task.
*/
- if (p->prio == rq->curr->prio && !need_resched())
+ if (p->prio == rq->curr->prio && !test_tsk_need_resched(rq->curr))
check_preempt_equal_prio(rq, p);
#endif
}
@@ -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 */
OpenPOWER on IntegriCloud