Skip to content

Commit e572fa0

Browse files
committed
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
2 parents d5fa080 + 0e334db commit e572fa0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

kernel/time/posix-timers.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,6 @@ static void common_hrtimer_rearm(struct k_itimer *timr)
289289
{
290290
struct hrtimer *timer = &timr->it.real.timer;
291291

292-
if (!timr->it_interval)
293-
return;
294-
295292
timr->it_overrun += hrtimer_forward(timer, timer->base->get_time(),
296293
timr->it_interval);
297294
hrtimer_restart(timer);
@@ -317,7 +314,7 @@ void posixtimer_rearm(struct kernel_siginfo *info)
317314
if (!timr)
318315
return;
319316

320-
if (timr->it_requeue_pending == info->si_sys_private) {
317+
if (timr->it_interval && timr->it_requeue_pending == info->si_sys_private) {
321318
timr->kclock->timer_rearm(timr);
322319

323320
timr->it_active = 1;

0 commit comments

Comments
 (0)