diff options
Diffstat (limited to 'kernel/hrtimer.c')
| -rw-r--r-- | kernel/hrtimer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 22a25142e4cf..e65dd0b47cdc 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
| @@ -850,6 +850,14 @@ hrtimer_start(struct hrtimer *timer, ktime_t tim, const enum hrtimer_mode mode) | |||
| 850 | #ifdef CONFIG_TIME_LOW_RES | 850 | #ifdef CONFIG_TIME_LOW_RES |
| 851 | tim = ktime_add(tim, base->resolution); | 851 | tim = ktime_add(tim, base->resolution); |
| 852 | #endif | 852 | #endif |
| 853 | /* | ||
| 854 | * Careful here: User space might have asked for a | ||
| 855 | * very long sleep, so the add above might result in a | ||
| 856 | * negative number, which enqueues the timer in front | ||
| 857 | * of the queue. | ||
| 858 | */ | ||
| 859 | if (tim.tv64 < 0) | ||
| 860 | tim.tv64 = KTIME_MAX; | ||
| 853 | } | 861 | } |
| 854 | timer->expires = tim; | 862 | timer->expires = tim; |
| 855 | 863 | ||
