aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/time/posix-cpu-timers.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
index 73c492ce404b..c3a95b122209 100644
--- a/kernel/time/posix-cpu-timers.c
+++ b/kernel/time/posix-cpu-timers.c
@@ -884,16 +884,17 @@ static void check_process_timers(struct task_struct *tsk,
884 884
885 /* 885 /*
886 * If there are no active process wide timers (POSIX 1.b, itimers, 886 * If there are no active process wide timers (POSIX 1.b, itimers,
887 * RLIMIT_CPU) nothing to check. 887 * RLIMIT_CPU) nothing to check. Also skip the process wide timer
888 * processing when there is already another task handling them.
888 */ 889 */
889 if (!READ_ONCE(pct->timers_active)) 890 if (!READ_ONCE(pct->timers_active) || pct->expiry_active)
890 return; 891 return;
891 892
892 /* 893 /*
893 * Signify that a thread is checking for process timers. 894 * Signify that a thread is checking for process timers.
894 * Write access to this field is protected by the sighand lock. 895 * Write access to this field is protected by the sighand lock.
895 */ 896 */
896 pct->timers_active = true; 897 pct->expiry_active = true;
897 898
898 /* 899 /*
899 * Collect the current process totals. Group accounting is active 900 * Collect the current process totals. Group accounting is active