linux-stable/kernel/time
Thomas Gleixner 0e334db6bb posix-timers: Fix division by zero bug
The signal delivery path of posix-timers can try to rearm the timer even if
the interval is zero. That's handled for the common case (hrtimer) but not
for alarm timers. In that case the forwarding function raises a division by
zero exception.

The handling for hrtimer based posix timers is wrong because it marks the
timer as active despite the fact that it is stopped.

Move the check from common_hrtimer_rearm() to posixtimer_rearm() to cure
both issues.

Reported-by: syzbot+9d38bedac9cc77b8ad5e@syzkaller.appspotmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: sboyd@kernel.org
Cc: stable@vger.kernel.org
Cc: syzkaller-bugs@googlegroups.com
Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1812171328050.1880@nanos.tec.linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2018-12-17 17:35:45 +01:00
..
Kconfig clocksource: Provide clocksource_arch_init() 2018-10-04 23:00:24 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
alarmtimer.c alarmtimer: Prevent overflow for relative nanosleep 2018-07-02 11:33:26 +02:00
clockevents.c clockevents: Warn if cpu_all_mask is used as cpumask 2018-08-02 14:55:53 +02:00
clocksource.c clocksource: Provide clocksource_arch_init() 2018-10-04 23:00:24 +02:00
hrtimer.c y2038: globally rename compat_time to old_time32 2018-08-27 14:48:48 +02:00
itimer.c pid: Implement PIDTYPE_TGID 2018-07-21 10:43:12 -05:00
jiffies.c jiffies: Revert bogus conversion of NSEC_PER_SEC to TICK_NSEC 2017-03-07 11:03:28 +01:00
ntp.c timekeeping/ntp: Constify some function arguments 2018-07-19 17:08:05 -07:00
ntp_internal.h timekeeping/ntp: Constify some function arguments 2018-07-19 17:08:05 -07:00
posix-clock.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
posix-cpu-timers.c posix-cpu-timers: Remove useless call to check_dl_overrun() 2018-11-08 07:43:35 +01:00
posix-stubs.c y2038: globally rename compat_time to old_time32 2018-08-27 14:48:48 +02:00
posix-timers.c posix-timers: Fix division by zero bug 2018-12-17 17:35:45 +01:00
posix-timers.h posix-timers: Make forward callback return s64 2018-07-02 11:33:25 +02:00
sched_clock.c sched/clock: Move sched clock initialization and merge with generic clock 2018-07-20 00:02:43 +02:00
test_udelay.c time: Avoid timespec in udelay_test 2016-06-20 12:47:26 -07:00
tick-broadcast-hrtimer.c tick/broadcast-hrtimer: Use cpu_possible_mask for ce_broadcast_hrtimer 2018-08-02 14:55:52 +02:00
tick-broadcast.c tick/broadcast: Remove redundant check 2018-09-28 22:29:35 +02:00
tick-common.c Revert "tick: Prefer a lower rating device only if it's CPU local device" 2018-07-10 22:12:47 +02:00
tick-internal.h Revert: Unify CLOCK_MONOTONIC and CLOCK_BOOTTIME 2018-04-26 14:53:32 +02:00
tick-oneshot.c clockevents: Fix kernel messages split across multiple lines 2018-04-17 17:18:04 +02:00
tick-sched.c tick/sched : Remove redundant cpu_online() check 2018-10-10 11:47:20 +02:00
tick-sched.h nohz: Gather tick_sched booleans under a common flag field 2018-04-09 11:54:57 +02:00
time.c compat: Cleanup in_compat_syscall() callers 2018-11-01 13:02:21 +01:00
timeconst.bc time: Introduce jiffies64_to_nsecs() 2017-02-01 09:13:45 +01:00
timeconv.c time: Add time64_to_tm() 2016-06-20 12:47:15 -07:00
timecounter.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
timekeeping.c y2038: make do_gettimeofday() and get_seconds() inline 2018-08-27 14:45:58 +02:00
timekeeping.h Revert: Unify CLOCK_MONOTONIC and CLOCK_BOOTTIME 2018-04-26 14:53:32 +02:00
timekeeping_debug.c timekeeping/ntp: Constify some function arguments 2018-07-19 17:08:05 -07:00
timekeeping_internal.h timekeeping/ntp: Constify some function arguments 2018-07-19 17:08:05 -07:00
timer.c timers: Clear timer_base::must_forward_clk with timer_base::lock held 2018-08-02 12:52:38 +02:00
timer_list.c Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-06-04 20:27:54 -07:00