1 |
commit: 33ff57f825f3237ce6b555afb0a55a7bf9a10eeb |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 16 11:03:00 2021 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 16 11:03:00 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=33ff57f8 |
7 |
|
8 |
Linux patch 5.14.5 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 ++++ |
13 |
1004_linux-5.14.5.patch | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 60 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 79faaf3..3b101ac 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -63,6 +63,10 @@ Patch: 1003_linux-5.14.4.patch |
21 |
From: http://www.kernel.org |
22 |
Desc: Linux 5.14.4 |
23 |
|
24 |
+Patch: 1004_linux-5.14.5.patch |
25 |
+From: http://www.kernel.org |
26 |
+Desc: Linux 5.14.5 |
27 |
+ |
28 |
Patch: 1500_XATTR_USER_PREFIX.patch |
29 |
From: https://bugs.gentoo.org/show_bug.cgi?id=470644 |
30 |
Desc: Support for namespace user.pax.* on tmpfs. |
31 |
|
32 |
diff --git a/1004_linux-5.14.5.patch b/1004_linux-5.14.5.patch |
33 |
new file mode 100644 |
34 |
index 0000000..5fbff40 |
35 |
--- /dev/null |
36 |
+++ b/1004_linux-5.14.5.patch |
37 |
@@ -0,0 +1,56 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index e16a1a80074cd..0eaa5623f4060 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 5 |
45 |
+ PATCHLEVEL = 14 |
46 |
+-SUBLEVEL = 4 |
47 |
++SUBLEVEL = 5 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = Opossums on Parade |
50 |
+ |
51 |
+diff --git a/include/linux/time64.h b/include/linux/time64.h |
52 |
+index 81b9686a20799..5117cb5b56561 100644 |
53 |
+--- a/include/linux/time64.h |
54 |
++++ b/include/linux/time64.h |
55 |
+@@ -25,9 +25,7 @@ struct itimerspec64 { |
56 |
+ #define TIME64_MIN (-TIME64_MAX - 1) |
57 |
+ |
58 |
+ #define KTIME_MAX ((s64)~((u64)1 << 63)) |
59 |
+-#define KTIME_MIN (-KTIME_MAX - 1) |
60 |
+ #define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) |
61 |
+-#define KTIME_SEC_MIN (KTIME_MIN / NSEC_PER_SEC) |
62 |
+ |
63 |
+ /* |
64 |
+ * Limits for settimeofday(): |
65 |
+@@ -126,13 +124,10 @@ static inline bool timespec64_valid_settod(const struct timespec64 *ts) |
66 |
+ */ |
67 |
+ static inline s64 timespec64_to_ns(const struct timespec64 *ts) |
68 |
+ { |
69 |
+- /* Prevent multiplication overflow / underflow */ |
70 |
+- if (ts->tv_sec >= KTIME_SEC_MAX) |
71 |
++ /* Prevent multiplication overflow */ |
72 |
++ if ((unsigned long long)ts->tv_sec >= KTIME_SEC_MAX) |
73 |
+ return KTIME_MAX; |
74 |
+ |
75 |
+- if (ts->tv_sec <= KTIME_SEC_MIN) |
76 |
+- return KTIME_MIN; |
77 |
+- |
78 |
+ return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec; |
79 |
+ } |
80 |
+ |
81 |
+diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c |
82 |
+index a002685f688d6..517be7fd175ef 100644 |
83 |
+--- a/kernel/time/posix-cpu-timers.c |
84 |
++++ b/kernel/time/posix-cpu-timers.c |
85 |
+@@ -1346,6 +1346,8 @@ void set_process_cpu_timer(struct task_struct *tsk, unsigned int clkid, |
86 |
+ } |
87 |
+ } |
88 |
+ |
89 |
++ if (!*newval) |
90 |
++ return; |
91 |
+ *newval += now; |
92 |
+ } |
93 |
+ |