put_task_struct(p);
timer->it.cpu.task = p = NULL;
timer->it.cpu.expires = 0;
- goto out_unlock;
+ read_unlock(&tasklist_lock);
+ goto out;
} else if (unlikely(p->exit_state) && thread_group_empty(p)) {
/*
* We've noticed that the thread is dead, but
*/
cpu_timer_sample_group(timer->it_clock, p, &now);
clear_dead_task(timer, now);
- goto out_unlock;
+ read_unlock(&tasklist_lock);
+ goto out;
}
spin_lock(&p->sighand->siglock);
cpu_timer_sample_group(timer->it_clock, p, &now);
BUG_ON(!irqs_disabled());
arm_timer(timer);
spin_unlock(&p->sighand->siglock);
-
-out_unlock:
read_unlock(&tasklist_lock);
+ /* Kick full dynticks CPUs in case they need to tick on the new timer */
+ posix_cpu_timer_kick_nohz();
+
out:
timer->it_overrun_last = timer->it_overrun;
timer->it_overrun = -1;
cpu_timer_fire(timer);
spin_unlock(&timer->it_lock);
}
-
- /*
- * In case some timers were rescheduled after the queue got emptied,
- * wake up full dynticks CPUs.
- */
- if (tsk->signal->cputimer.running)
- posix_cpu_timer_kick_nohz();
}
/*