Skip to content

Commit

Permalink
Merge tag 'v5.14.5' into 5.14
Browse files Browse the repository at this point in the history
This is the 5.14.5 stable release
  • Loading branch information
xanmod committed Sep 16, 2021
2 parents d4b9422 + d92805b commit 596ccea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 14
SUBLEVEL = 4
SUBLEVEL = 5
EXTRAVERSION =
NAME = Opossums on Parade

Expand Down
9 changes: 2 additions & 7 deletions include/linux/time64.h
Expand Up @@ -25,9 +25,7 @@ struct itimerspec64 {
#define TIME64_MIN (-TIME64_MAX - 1)

#define KTIME_MAX ((s64)~((u64)1 << 63))
#define KTIME_MIN (-KTIME_MAX - 1)
#define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC)
#define KTIME_SEC_MIN (KTIME_MIN / NSEC_PER_SEC)

/*
* Limits for settimeofday():
Expand Down Expand Up @@ -126,13 +124,10 @@ static inline bool timespec64_valid_settod(const struct timespec64 *ts)
*/
static inline s64 timespec64_to_ns(const struct timespec64 *ts)
{
/* Prevent multiplication overflow / underflow */
if (ts->tv_sec >= KTIME_SEC_MAX)
/* Prevent multiplication overflow */
if ((unsigned long long)ts->tv_sec >= KTIME_SEC_MAX)
return KTIME_MAX;

if (ts->tv_sec <= KTIME_SEC_MIN)
return KTIME_MIN;

return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec;
}

Expand Down
2 changes: 2 additions & 0 deletions kernel/time/posix-cpu-timers.c
Expand Up @@ -1346,6 +1346,8 @@ void set_process_cpu_timer(struct task_struct *tsk, unsigned int clkid,
}
}

if (!*newval)
return;
*newval += now;
}

Expand Down

0 comments on commit 596ccea

Please sign in to comment.