clockevents: warn once when program_event() is called with negative expiry

The hrtimer problem with large relative timeouts resulting in a
negative expiry time went unnoticed as there is no check in the
clockevents_program_event() code. Put a check there with a WARN_ONCE
to avoid such problems in the future.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by Thomas Gleixner and committed by Ingo Molnar 167b1de3 62f0f61e

+5
+5
kernel/time/clockevents.c
··· 78 78 unsigned long long clc; 79 79 int64_t delta; 80 80 81 + if (unlikely(expires.tv64 < 0)) { 82 + WARN_ON_ONCE(1); 83 + return -ETIME; 84 + } 85 + 81 86 delta = ktime_to_ns(ktime_sub(expires, now)); 82 87 83 88 if (delta <= 0)