linux-bl808/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
..
alarmtimer.c
clockevents.c
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
jiffies.c
Kconfig clocksource: Provide clocksource_arch_init() 2018-10-04 23:00:24 +02:00
Makefile
ntp.c
ntp_internal.h
posix-clock.c
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
sched_clock.c
test_udelay.c
tick-broadcast-hrtimer.c
tick-broadcast.c tick/broadcast: Remove redundant check 2018-09-28 22:29:35 +02:00
tick-common.c
tick-internal.h
tick-oneshot.c
tick-sched.c tick/sched : Remove redundant cpu_online() check 2018-10-10 11:47:20 +02:00
tick-sched.h
time.c compat: Cleanup in_compat_syscall() callers 2018-11-01 13:02:21 +01:00
timeconst.bc
timeconv.c
timecounter.c
timekeeping.c y2038: make do_gettimeofday() and get_seconds() inline 2018-08-27 14:45:58 +02:00
timekeeping.h
timekeeping_debug.c
timekeeping_internal.h
timer.c
timer_list.c