aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds2021-09-26 10:00:16 -0700
committerLinus Torvalds2021-09-26 10:00:16 -0700
commit3a398acc56dd7592eba081ce1ea356151ab90e2d (patch)
tree56f7414dd2e320a6963c050ee761aae536e3c6de
parentdc0f97c2613d09734719ef89d99d06417d92337d (diff)
parent8cd9da85d2bd87ce889043e7b1735723dd10eb89 (diff)
Merge tag 'timers-urgent-2021-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fix from Thomas Gleixner: "A single fix for the recently introduced regression in posix CPU timers which failed to stop the timer when requested. That caused unexpected signals to be sent to the process/thread causing malfunction" * tag 'timers-urgent-2021-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: posix-cpu-timers: Prevent spuriously armed 0-value itimer
-rw-r--r--kernel/time/posix-cpu-timers.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
index ee736861b18f..643d412ac623 100644
--- a/kernel/time/posix-cpu-timers.c
+++ b/kernel/time/posix-cpu-timers.c
@@ -1404,7 +1404,8 @@ void set_process_cpu_timer(struct task_struct *tsk, unsigned int clkid,
}
}
- *newval += now;
+ if (*newval)
+ *newval += now;
}
/*