aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-06-16 00:45:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-06-16 00:45:18 -0400
commita1b6ae8ed01736dae19a33e74ea4e8dd88f891b5 (patch)
tree62019061cacdc90ba1454a8f9d227acbd7a64cde /kernel
parent21c5977a836e399fc710ff2c5367845ed5c2527f (diff)
parent0da938c44921cfb690283d3b0c9c48a10375db2c (diff)
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
Diffstat (limited to 'kernel')
-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 88725c939e0b..10d018212bab 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
1096 * to move current somewhere else, making room for our non-migratable 1096 * to move current somewhere else, making room for our non-migratable
1097 * task. 1097 * task.
1098 */ 1098 */
1099 if (p->prio == rq->curr->prio && !need_resched()) 1099 if (p->prio == rq->curr->prio && !test_tsk_need_resched(rq->curr))
1100 check_preempt_equal_prio(rq, p); 1100 check_preempt_equal_prio(rq, p);
1101#endif 1101#endif
1102} 1102}
@@ -1239,6 +1239,10 @@ static int find_lowest_rq(struct task_struct *task)
1239 int this_cpu = smp_processor_id(); 1239 int this_cpu = smp_processor_id();
1240 int cpu = task_cpu(task); 1240 int cpu = task_cpu(task);
1241 1241
1242 /* Make sure the mask is initialized first */
1243 if (unlikely(!lowest_mask))
1244 return -1;
1245
1242 if (task->rt.nr_cpus_allowed == 1) 1246 if (task->rt.nr_cpus_allowed == 1)
1243 return -1; /* No other targets possible */ 1247 return -1; /* No other targets possible */
1244 1248