prev->active_mm = NULL;
                rq->prev_mm = oldmm;
        }
+
+       rq->clock_skip_update = 0;
+
        /*
         * Since the runqueue lock will be released by the next
         * task (which is an invalid locking op but in the case
        next = pick_next_task(rq, prev, &rf);
        clear_tsk_need_resched(prev);
        clear_preempt_need_resched();
-       rq->clock_skip_update = 0;
 
        if (likely(prev != next)) {
                rq->nr_switches++;
                trace_sched_switch(preempt, prev, next);
                rq = context_switch(rq, prev, next, &rf); /* unlocks the rq */
        } else {
+               rq->clock_skip_update = 0;
                rq_unpin_lock(rq, &rf);
                raw_spin_unlock_irq(&rq->lock);
        }