[PATCH] sched/deadline: fix double enqueue on dl_task_timer.

From: Juri Lelli
Date: Tue Oct 07 2014 - 05:29:09 EST


Signed-off-by: Juri Lelli <juri.lelli@xxxxxxx>
---
kernel/sched/deadline.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 255ce13..d0beefa 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -520,10 +520,13 @@ again:
/*
* We need to take care of a possible races here. In fact, the
* task might have changed its scheduling policy to something
- * different from SCHED_DEADLINE or changed its reservation
- * parameters (through sched_setattr()).
+ * different from SCHED_DEADLINE, changed its reservation
+ * parameters (through sched_setattr()) or inherited priority
+ * (and parameters) from someone else (in this last case it is
+ * also outside of bandwidth enforcement, so we can safely bail
+ * out).
*/
- if (!dl_task(p) || dl_se->dl_new)
+ if (!dl_task(p) || dl_se->dl_new || dl_se->dl_boosted)
goto unlock;

sched_clock_tick();
--
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/