mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-29 22:07:43 +09:00
alarmtimers: Fix time comparison
commit c9c024b3f3 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e0b652a1a2
commit
b2b3ffbcbc
@@ -181,7 +181,7 @@ static enum hrtimer_restart alarmtimer_fired(struct hrtimer *timer)
|
||||
struct alarm *alarm;
|
||||
ktime_t expired = next->expires;
|
||||
|
||||
if (expired.tv64 >= now.tv64)
|
||||
if (expired.tv64 > now.tv64)
|
||||
break;
|
||||
|
||||
alarm = container_of(next, struct alarm, node);
|
||||
|
||||
Reference in New Issue
Block a user