alarmtimers: Fix time comparison
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> Cc: stable@kernel.org
This commit is contained in:
parent
d68fb11c3d
commit
c9c024b3f3
1 changed files with 1 additions and 1 deletions
|
@ -195,7 +195,7 @@ static enum hrtimer_restart alarmtimer_fired(struct hrtimer *timer)
|
||||||
struct alarm *alarm;
|
struct alarm *alarm;
|
||||||
ktime_t expired = next->expires;
|
ktime_t expired = next->expires;
|
||||||
|
|
||||||
if (expired.tv64 >= now.tv64)
|
if (expired.tv64 > now.tv64)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
alarm = container_of(next, struct alarm, node);
|
alarm = container_of(next, struct alarm, node);
|
||||||
|
|
Loading…
Reference in a new issue