Subject: [patch] high-res timers: next_event calculation fix
From: Ingo Molnar <[email protected]>
do not set expires_next to KTIME_MAX if a too short timeout
is being set - this can result in the clock events device
being shut down completely.
found via a stresstest on a C3-lapic-plagued laptop that did
very short sleeps.
This bug could explain the 'Synaptics hang' that was reported.
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
---
kernel/time/clockevents.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Index: linux/kernel/time/clockevents.c
===================================================================
--- linux.orig/kernel/time/clockevents.c
+++ linux/kernel/time/clockevents.c
@@ -510,10 +510,8 @@ int clockevents_set_next_event(ktime_t e
struct clock_event_device *nextevt = devices->nextevt;
int64_t delta = ktime_to_ns(ktime_sub(expires, ktime_get()));
- if (delta <= 0 && !force) {
- devices->expires_next.tv64 = KTIME_MAX;
+ if (delta <= 0 && !force)
return -ETIME;
- }
devices->expires_next = expires;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]