diff options
-rw-r--r-- | kernel/sched_rt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 76e828517541..0a6d2e516420 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, | |||
1107 | pull_rt_task(rq); | 1107 | pull_rt_task(rq); |
1108 | /* | 1108 | /* |
1109 | * If there's a higher priority task waiting to run | 1109 | * If there's a higher priority task waiting to run |
1110 | * then reschedule. | 1110 | * then reschedule. Note, the above pull_rt_task |
1111 | * can release the rq lock and p could migrate. | ||
1112 | * Only reschedule if p is still on the same runqueue. | ||
1111 | */ | 1113 | */ |
1112 | if (p->prio > rq->rt.highest_prio) | 1114 | if (p->prio > rq->rt.highest_prio && rq->curr == p) |
1113 | resched_task(p); | 1115 | resched_task(p); |
1114 | #else | 1116 | #else |
1115 | /* For UP simply resched on drop of prio */ | 1117 | /* For UP simply resched on drop of prio */ |