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.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
index 564b3b0240dd..799f360d1475 100644
--- a/kernel/posix-cpu-timers.c
+++ b/kernel/posix-cpu-timers.c
@@ -997,9 +997,9 @@ static void check_thread_timers(struct task_struct *tsk,
997 } 997 }
998} 998}
999 999
1000static void stop_process_timers(struct task_struct *tsk) 1000static void stop_process_timers(struct signal_struct *sig)
1001{ 1001{
1002 struct thread_group_cputimer *cputimer = &tsk->signal->cputimer; 1002 struct thread_group_cputimer *cputimer = &sig->cputimer;
1003 unsigned long flags; 1003 unsigned long flags;
1004 1004
1005 if (!cputimer->running) 1005 if (!cputimer->running)
@@ -1008,6 +1008,10 @@ static void stop_process_timers(struct task_struct *tsk)
1008 spin_lock_irqsave(&cputimer->lock, flags); 1008 spin_lock_irqsave(&cputimer->lock, flags);
1009 cputimer->running = 0; 1009 cputimer->running = 0;
1010 spin_unlock_irqrestore(&cputimer->lock, flags); 1010 spin_unlock_irqrestore(&cputimer->lock, flags);
1011
1012 sig->cputime_expires.prof_exp = cputime_zero;
1013 sig->cputime_expires.virt_exp = cputime_zero;
1014 sig->cputime_expires.sched_exp = 0;
1011} 1015}
1012 1016
1013static u32 onecputick; 1017static u32 onecputick;
@@ -1069,7 +1073,7 @@ static void check_process_timers(struct task_struct *tsk,
1069 list_empty(&timers[CPUCLOCK_VIRT]) && 1073 list_empty(&timers[CPUCLOCK_VIRT]) &&
1070 cputime_eq(sig->it[CPUCLOCK_VIRT].expires, cputime_zero) && 1074 cputime_eq(sig->it[CPUCLOCK_VIRT].expires, cputime_zero) &&
1071 list_empty(&timers[CPUCLOCK_SCHED])) { 1075 list_empty(&timers[CPUCLOCK_SCHED])) {
1072 stop_process_timers(tsk); 1076 stop_process_timers(sig);
1073 return; 1077 return;
1074 } 1078 }
1075 1079