1 |
commit: 527c78593c55fa24f36571a4d13286fc2c1a947e |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 16 11:02:15 2021 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 16 11:02:15 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=527c7859 |
7 |
|
8 |
Linux patch 5.13.18 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
1017_linux-5.13.18.patch | 75 ++++++++++++++++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 75 insertions(+) |
14 |
|
15 |
diff --git a/1017_linux-5.13.18.patch b/1017_linux-5.13.18.patch |
16 |
new file mode 100644 |
17 |
index 0000000..f9aefb6 |
18 |
--- /dev/null |
19 |
+++ b/1017_linux-5.13.18.patch |
20 |
@@ -0,0 +1,75 @@ |
21 |
+diff --git a/Makefile b/Makefile |
22 |
+index c79a2c70a22ba..ddbd64b92a723 100644 |
23 |
+--- a/Makefile |
24 |
++++ b/Makefile |
25 |
+@@ -1,7 +1,7 @@ |
26 |
+ # SPDX-License-Identifier: GPL-2.0 |
27 |
+ VERSION = 5 |
28 |
+ PATCHLEVEL = 13 |
29 |
+-SUBLEVEL = 17 |
30 |
++SUBLEVEL = 18 |
31 |
+ EXTRAVERSION = |
32 |
+ NAME = Opossums on Parade |
33 |
+ |
34 |
+diff --git a/include/linux/time64.h b/include/linux/time64.h |
35 |
+index 81b9686a20799..5117cb5b56561 100644 |
36 |
+--- a/include/linux/time64.h |
37 |
++++ b/include/linux/time64.h |
38 |
+@@ -25,9 +25,7 @@ struct itimerspec64 { |
39 |
+ #define TIME64_MIN (-TIME64_MAX - 1) |
40 |
+ |
41 |
+ #define KTIME_MAX ((s64)~((u64)1 << 63)) |
42 |
+-#define KTIME_MIN (-KTIME_MAX - 1) |
43 |
+ #define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) |
44 |
+-#define KTIME_SEC_MIN (KTIME_MIN / NSEC_PER_SEC) |
45 |
+ |
46 |
+ /* |
47 |
+ * Limits for settimeofday(): |
48 |
+@@ -126,13 +124,10 @@ static inline bool timespec64_valid_settod(const struct timespec64 *ts) |
49 |
+ */ |
50 |
+ static inline s64 timespec64_to_ns(const struct timespec64 *ts) |
51 |
+ { |
52 |
+- /* Prevent multiplication overflow / underflow */ |
53 |
+- if (ts->tv_sec >= KTIME_SEC_MAX) |
54 |
++ /* Prevent multiplication overflow */ |
55 |
++ if ((unsigned long long)ts->tv_sec >= KTIME_SEC_MAX) |
56 |
+ return KTIME_MAX; |
57 |
+ |
58 |
+- if (ts->tv_sec <= KTIME_SEC_MIN) |
59 |
+- return KTIME_MIN; |
60 |
+- |
61 |
+ return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec; |
62 |
+ } |
63 |
+ |
64 |
+diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c |
65 |
+index a9f8d25220b1a..aa52fc85dbcbf 100644 |
66 |
+--- a/kernel/time/posix-cpu-timers.c |
67 |
++++ b/kernel/time/posix-cpu-timers.c |
68 |
+@@ -1346,6 +1346,8 @@ void set_process_cpu_timer(struct task_struct *tsk, unsigned int clkid, |
69 |
+ } |
70 |
+ } |
71 |
+ |
72 |
++ if (!*newval) |
73 |
++ return; |
74 |
+ *newval += now; |
75 |
+ } |
76 |
+ |
77 |
+diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c |
78 |
+index bf1bb08b94aad..8d455c2321545 100644 |
79 |
+--- a/net/bluetooth/hci_core.c |
80 |
++++ b/net/bluetooth/hci_core.c |
81 |
+@@ -1740,14 +1740,6 @@ int hci_dev_do_close(struct hci_dev *hdev) |
82 |
+ hci_request_cancel_all(hdev); |
83 |
+ hci_req_sync_lock(hdev); |
84 |
+ |
85 |
+- if (!hci_dev_test_flag(hdev, HCI_UNREGISTER) && |
86 |
+- !hci_dev_test_flag(hdev, HCI_USER_CHANNEL) && |
87 |
+- test_bit(HCI_UP, &hdev->flags)) { |
88 |
+- /* Execute vendor specific shutdown routine */ |
89 |
+- if (hdev->shutdown) |
90 |
+- hdev->shutdown(hdev); |
91 |
+- } |
92 |
+- |
93 |
+ if (!test_and_clear_bit(HCI_UP, &hdev->flags)) { |
94 |
+ cancel_delayed_work_sync(&hdev->cmd_timer); |
95 |
+ hci_req_sync_unlock(hdev); |