hrtimer: catch expired CLOCK_REALTIME timers early
authorThomas Gleixner <tglx@linutronix.de>
Wed, 13 Feb 2008 23:58:36 +0000 (00:58 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 14 Feb 2008 21:08:30 +0000 (22:08 +0100)
A CLOCK_REALTIME timer, which has an absolute expiry time less than
the clock realtime offset calls with a negative delta into the clock
events code and triggers the WARN_ON() there.

This is a false positive and needs to be prevented. Check the result
of timer->expires - timer->base->offset right away and return -ETIME
right away.

Thanks to Frans Pop, who reported the problem and tested the fixes.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Frans Pop <elendil@planet.nl>
kernel/hrtimer.c

Simple merge