X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=kernel%2Fsched_rt.c;h=0a6d2e516420516cb1d0c35a5345db1f356f71ab;hb=406874a7ccee927049b1c182df69457718b938da;hp=76e828517541b742c960de0b48bd503ea88f99d6;hpb=d7fe321eeba58f0a37cc4324d10e52092be457e0;p=linux-2.6-omap-h63xx.git diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 76e82851754..0a6d2e51642 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c @@ -1107,9 +1107,11 @@ static void prio_changed_rt(struct rq *rq, struct task_struct *p, pull_rt_task(rq); /* * If there's a higher priority task waiting to run - * then reschedule. + * then reschedule. Note, the above pull_rt_task + * can release the rq lock and p could migrate. + * Only reschedule if p is still on the same runqueue. */ - if (p->prio > rq->rt.highest_prio) + if (p->prio > rq->rt.highest_prio && rq->curr == p) resched_task(p); #else /* For UP simply resched on drop of prio */