|
@@ -513,9 +513,17 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer)
|
|
struct sched_dl_entity,
|
|
struct sched_dl_entity,
|
|
dl_timer);
|
|
dl_timer);
|
|
struct task_struct *p = dl_task_of(dl_se);
|
|
struct task_struct *p = dl_task_of(dl_se);
|
|
- struct rq *rq = task_rq(p);
|
|
|
|
|
|
+ struct rq *rq;
|
|
|
|
+again:
|
|
|
|
+ rq = task_rq(p);
|
|
raw_spin_lock(&rq->lock);
|
|
raw_spin_lock(&rq->lock);
|
|
|
|
|
|
|
|
+ if (rq != task_rq(p)) {
|
|
|
|
+ /* Task was moved, retrying. */
|
|
|
|
+ raw_spin_unlock(&rq->lock);
|
|
|
|
+ goto again;
|
|
|
|
+ }
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* We need to take care of a possible races here. In fact, the
|
|
* We need to take care of a possible races here. In fact, the
|
|
* task might have changed its scheduling policy to something
|
|
* task might have changed its scheduling policy to something
|