projects/linux·commit 3a398acc

Merge tag 'timers-urgent-2021-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

3a398acc · Linus Torvalds <[email protected]> · 2021-09-26 10:00:16 -07:00

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
Commit
3a398acc56dd7592eba081ce1ea356151ab90e2d
Parents
dc0f97c2 · 8cd9da85

Merge commit. Changes below are compared with the first parent: dc0f97c2.

Changes

1 files changed · +2 −1

FileStatusAddDelContent
kernel/time/posix-cpu-timers.cmodified+2−1View file

kernel/time/posix-cpu-timers.c

View file
diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
index ee73686..643d412 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;
}
/*