aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/posix-cpu-timers.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/posix-cpu-timers.c')
-rw-r--r--kernel/posix-cpu-timers.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
index ccb04683bf18..92a038064628 100644
--- a/kernel/posix-cpu-timers.c
+++ b/kernel/posix-cpu-timers.c
@@ -486,6 +486,9 @@ static void process_timer_rebalance(struct task_struct *p,
486 struct task_struct *t = p; 486 struct task_struct *t = p;
487 unsigned int nthreads = atomic_read(&p->signal->live); 487 unsigned int nthreads = atomic_read(&p->signal->live);
488 488
489 if (!nthreads)
490 return;
491
489 switch (clock_idx) { 492 switch (clock_idx) {
490 default: 493 default:
491 BUG(); 494 BUG();
@@ -1160,6 +1163,9 @@ static void check_process_timers(struct task_struct *tsk,
1160 unsigned long long sched_left, sched; 1163 unsigned long long sched_left, sched;
1161 const unsigned int nthreads = atomic_read(&sig->live); 1164 const unsigned int nthreads = atomic_read(&sig->live);
1162 1165
1166 if (!nthreads)
1167 return;
1168
1163 prof_left = cputime_sub(prof_expires, utime); 1169 prof_left = cputime_sub(prof_expires, utime);
1164 prof_left = cputime_sub(prof_left, stime); 1170 prof_left = cputime_sub(prof_left, stime);
1165 prof_left = cputime_div(prof_left, nthreads); 1171 prof_left = cputime_div(prof_left, nthreads);