Skip to content

Commit

Permalink
sched: Fix update_curr_rt()
Browse files Browse the repository at this point in the history
cpu_stopper_thread()
  migration_cpu_stop()
    __migrate_task()
      deactivate_task()
        dequeue_task()
          dequeue_task_rq()
            update_curr_rt()

Will call update_curr_rt() on rq->curr, which at that time is
rq->stop. The problem is that rq->stop.prio matches an RT prio and
thus falsely assumes its a rt_sched_class task.

Reported-Debuged-Tested-Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Cc: stable@kernel.org # .37
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Feb 3, 2011
1 parent 1e1dbb2 commit 06c3bc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sched_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ static void update_curr_rt(struct rq *rq)
struct rt_rq *rt_rq = rt_rq_of_se(rt_se);
u64 delta_exec;

if (!task_has_rt_policy(curr))
if (curr->sched_class != &rt_sched_class)
return;

delta_exec = rq->clock_task - curr->se.exec_start;
Expand Down

0 comments on commit 06c3bc6

Please sign in to comment.