Skip to content

Commit b2b3ffb

Browse files
KAGA-KOKOgregkh
authored andcommitted
alarmtimers: Fix time comparison
commit c9c024b upstream. The expiry function compares the timer against current time and does not expire the timer when the expiry time is >= now. That's wrong. If the timer is set for now, then it must expire. Make the condition expiry > now for breaking out the loop. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent e0b652a commit b2b3ffb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/time/alarmtimer.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ static enum hrtimer_restart alarmtimer_fired(struct hrtimer *timer)
181181
struct alarm *alarm;
182182
ktime_t expired = next->expires;
183183

184-
if (expired.tv64 >= now.tv64)
184+
if (expired.tv64 > now.tv64)
185185
break;
186186

187187
alarm = container_of(next, struct alarm, node);

0 commit comments

Comments
 (0)