diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index d6830d5ae730..071e093c4486 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -1323,6 +1323,8 @@ retry: expires = ktime_sub(hrtimer_get_expires(timer), base->offset); + if (expires.tv64 < 0) + expires.tv64 = KTIME_MAX; if (expires.tv64 < expires_next.tv64) expires_next = expires; break;