Skip to content

Commit

Permalink
Bugfix: make sure rq->clock is current
Browse files Browse the repository at this point in the history
Before using rq->clock to represent the current time, make sure that
the value in rq->clock has actually been updated.
  • Loading branch information
brandenburg committed May 26, 2014
1 parent fe59630 commit b03f803
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kernel/sched/litmus.c
Expand Up @@ -167,6 +167,7 @@ litmus_schedule(struct rq *rq, struct task_struct *prev)
#else
next->rt_param.stack_in_use = 0;
#endif
update_rq_clock(rq);
next->se.exec_start = rq->clock;
}

Expand Down Expand Up @@ -240,6 +241,9 @@ static void put_prev_task_litmus(struct rq *rq, struct task_struct *p)
#ifdef CONFIG_SMP
static void pre_schedule_litmus(struct rq *rq, struct task_struct *prev)
{
update_rq_clock(rq);
/* tell update_rq_clock() that we just did that */
rq->skip_clock_update = 1;
update_time_litmus(rq, prev);
if (!is_running(prev))
tsk_rt(prev)->present = 0;
Expand Down

0 comments on commit b03f803

Please sign in to comment.