Commit-ID: c9c024b3f3e07d087974db4c0dc46217fff3a6c0 Gitweb: http://git.kernel.org/tip/c9c024b3f3e07d087974db4c0dc46217fff3a6c0 Author: Thomas Gleixner <tglx@xxxxxxxxxxxxx> AuthorDate: Mon, 5 Dec 2011 21:20:23 +0100 Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx> CommitDate: Tue, 6 Dec 2011 11:38:32 +0100 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@xxxxxxxxxxxxx> Acked-by: John Stultz <john.stultz@xxxxxxxxxx> Cc: stable@xxxxxxxxxx --- kernel/time/alarmtimer.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index c436e79..8a46f5d 100644 --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alarmtimer.c @@ -195,7 +195,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); -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html