diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-21 10:51:54 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-21 10:51:54 -0800 |
commit | e572fa0e840154d33a69622af030dda551eee606 (patch) | |
tree | f1f5e6a1dc5dfad90cc82071af14c1529bd519aa | |
parent | d5fa080d4ceaa8fec0fb28e27c7447caf4b4d22b (diff) | |
parent | 0e334db6bb4b1fd1e2d72c1f3d8f004313cd9f94 (diff) | |
download | linux-stable-e572fa0e840154d33a69622af030dda551eee606.tar.gz linux-stable-e572fa0e840154d33a69622af030dda551eee606.tar.bz2 linux-stable-e572fa0e840154d33a69622af030dda551eee606.zip |
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fix from Ingo Molnar:
"Fix a division by zero crash in the posix-timers code"
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
posix-timers: Fix division by zero bug
-rw-r--r-- | kernel/time/posix-timers.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c index bd62b5eeb5a0..31f49ae80f43 100644 --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -289,9 +289,6 @@ static void common_hrtimer_rearm(struct k_itimer *timr) { struct hrtimer *timer = &timr->it.real.timer; - if (!timr->it_interval) - return; - timr->it_overrun += hrtimer_forward(timer, timer->base->get_time(), timr->it_interval); hrtimer_restart(timer); @@ -317,7 +314,7 @@ void posixtimer_rearm(struct kernel_siginfo *info) if (!timr) return; - if (timr->it_requeue_pending == info->si_sys_private) { + if (timr->it_interval && timr->it_requeue_pending == info->si_sys_private) { timr->kclock->timer_rearm(timr); timr->it_active = 1; |