aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/deadline.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 800e99b99075..14bc348ba3b4 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -513,9 +513,17 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer)
513 struct sched_dl_entity, 513 struct sched_dl_entity,
514 dl_timer); 514 dl_timer);
515 struct task_struct *p = dl_task_of(dl_se); 515 struct task_struct *p = dl_task_of(dl_se);
516 struct rq *rq = task_rq(p); 516 struct rq *rq;
517again:
518 rq = task_rq(p);
517 raw_spin_lock(&rq->lock); 519 raw_spin_lock(&rq->lock);
518 520
521 if (rq != task_rq(p)) {
522 /* Task was moved, retrying. */
523 raw_spin_unlock(&rq->lock);
524 goto again;
525 }
526
519 /* 527 /*
520 * We need to take care of a possible races here. In fact, the 528 * We need to take care of a possible races here. In fact, the
521 * task might have changed its scheduling policy to something 529 * task might have changed its scheduling policy to something