lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 10 Aug 2021 15:13:33 -0000
From:   "tip-bot2 for Frederic Weisbecker" <>
Cc:     Frederic Weisbecker <>,
        Thomas Gleixner <>,
        "Peter Zijlstra (Intel)" <>,,
Subject: [tip: timers/core] posix-cpu-timers: Force next expiration recalc
 after itimer reset

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     406dd42bd1ba0c01babf9cde169bb319e52f6147
Author:        Frederic Weisbecker <>
AuthorDate:    Mon, 26 Jul 2021 14:55:10 +02:00
Committer:     Thomas Gleixner <>
CommitterDate: Tue, 10 Aug 2021 17:09:59 +02:00

posix-cpu-timers: Force next expiration recalc after itimer reset

When an itimer deactivates a previously armed expiration, it simply doesn't
do anything. As a result the process wide cputime counter keeps running and
the tick dependency stays set until it reaches the old ghost expiration

This can be reproduced with the following snippet:

	void trigger_process_counter(void)
		struct itimerval n = {};

		n.it_value.tv_sec = 100;
		setitimer(ITIMER_VIRTUAL, &n, NULL);
		n.it_value.tv_sec = 0;
		setitimer(ITIMER_VIRTUAL, &n, NULL);

Fix this with resetting the relevant base expiration. This is similar to
disarming a timer.

Signed-off-by: Frederic Weisbecker <>
Signed-off-by: Thomas Gleixner <>
Acked-by: Peter Zijlstra (Intel) <>

 kernel/time/posix-cpu-timers.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
index 61c78b6..5c71322 100644
--- a/kernel/time/posix-cpu-timers.c
+++ b/kernel/time/posix-cpu-timers.c
@@ -1379,8 +1379,6 @@ void set_process_cpu_timer(struct task_struct *tsk, unsigned int clkid,
-		if (!*newval)
-			return;
 		*newval += now;

Powered by blists - more mailing lists