1 |
commit: afc259e522958b1fad1850233f82662881910da5 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 16 11:19:18 2021 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 16 11:19:18 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=afc259e5 |
7 |
|
8 |
Linux patch 5.4.147 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 ++ |
13 |
1146_linux-5.4.147.patch | 97 ++++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 101 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index f0cfe0c..4d2be88 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -627,6 +627,10 @@ Patch: 1145_linux-5.4.146.patch |
21 |
From: http://www.kernel.org |
22 |
Desc: Linux 5.4.146 |
23 |
|
24 |
+Patch: 1146_linux-5.4.147.patch |
25 |
+From: http://www.kernel.org |
26 |
+Desc: Linux 5.4.147 |
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/1146_linux-5.4.147.patch b/1146_linux-5.4.147.patch |
33 |
new file mode 100644 |
34 |
index 0000000..472a6d8 |
35 |
--- /dev/null |
36 |
+++ b/1146_linux-5.4.147.patch |
37 |
@@ -0,0 +1,97 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index 48d0c03acfc55..98227dae34947 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 5 |
45 |
+ PATCHLEVEL = 4 |
46 |
+-SUBLEVEL = 146 |
47 |
++SUBLEVEL = 147 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = Kleptomaniac Octopus |
50 |
+ |
51 |
+diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c |
52 |
+index bc3ab98855cf0..25e81b1a59a54 100644 |
53 |
+--- a/drivers/block/nbd.c |
54 |
++++ b/drivers/block/nbd.c |
55 |
+@@ -1744,17 +1744,7 @@ static int nbd_dev_add(int index) |
56 |
+ refcount_set(&nbd->refs, 1); |
57 |
+ INIT_LIST_HEAD(&nbd->list); |
58 |
+ disk->major = NBD_MAJOR; |
59 |
+- |
60 |
+- /* Too big first_minor can cause duplicate creation of |
61 |
+- * sysfs files/links, since first_minor will be truncated to |
62 |
+- * byte in __device_add_disk(). |
63 |
+- */ |
64 |
+ disk->first_minor = index << part_shift; |
65 |
+- if (disk->first_minor > 0xff) { |
66 |
+- err = -EINVAL; |
67 |
+- goto out_free_idr; |
68 |
+- } |
69 |
+- |
70 |
+ disk->fops = &nbd_fops; |
71 |
+ disk->private_data = nbd; |
72 |
+ sprintf(disk->disk_name, "nbd%d", index); |
73 |
+diff --git a/include/linux/time64.h b/include/linux/time64.h |
74 |
+index f6059c505986b..5eab3f2635186 100644 |
75 |
+--- a/include/linux/time64.h |
76 |
++++ b/include/linux/time64.h |
77 |
+@@ -33,9 +33,7 @@ struct itimerspec64 { |
78 |
+ #define TIME64_MIN (-TIME64_MAX - 1) |
79 |
+ |
80 |
+ #define KTIME_MAX ((s64)~((u64)1 << 63)) |
81 |
+-#define KTIME_MIN (-KTIME_MAX - 1) |
82 |
+ #define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) |
83 |
+-#define KTIME_SEC_MIN (KTIME_MIN / NSEC_PER_SEC) |
84 |
+ |
85 |
+ /* |
86 |
+ * Limits for settimeofday(): |
87 |
+@@ -134,13 +132,10 @@ static inline bool timespec64_valid_settod(const struct timespec64 *ts) |
88 |
+ */ |
89 |
+ static inline s64 timespec64_to_ns(const struct timespec64 *ts) |
90 |
+ { |
91 |
+- /* Prevent multiplication overflow / underflow */ |
92 |
+- if (ts->tv_sec >= KTIME_SEC_MAX) |
93 |
++ /* Prevent multiplication overflow */ |
94 |
++ if ((unsigned long long)ts->tv_sec >= KTIME_SEC_MAX) |
95 |
+ return KTIME_MAX; |
96 |
+ |
97 |
+- if (ts->tv_sec <= KTIME_SEC_MIN) |
98 |
+- return KTIME_MIN; |
99 |
+- |
100 |
+ return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec; |
101 |
+ } |
102 |
+ |
103 |
+diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c |
104 |
+index 30e061b210b7c..eacb0ca301932 100644 |
105 |
+--- a/kernel/time/posix-cpu-timers.c |
106 |
++++ b/kernel/time/posix-cpu-timers.c |
107 |
+@@ -1201,6 +1201,8 @@ void set_process_cpu_timer(struct task_struct *tsk, unsigned int clkid, |
108 |
+ } |
109 |
+ } |
110 |
+ |
111 |
++ if (!*newval) |
112 |
++ return; |
113 |
+ *newval += now; |
114 |
+ } |
115 |
+ |
116 |
+diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c |
117 |
+index bdd330527cfa2..c50e3e8afbd34 100644 |
118 |
+--- a/net/bluetooth/hci_core.c |
119 |
++++ b/net/bluetooth/hci_core.c |
120 |
+@@ -1691,14 +1691,6 @@ int hci_dev_do_close(struct hci_dev *hdev) |
121 |
+ hci_request_cancel_all(hdev); |
122 |
+ hci_req_sync_lock(hdev); |
123 |
+ |
124 |
+- if (!hci_dev_test_flag(hdev, HCI_UNREGISTER) && |
125 |
+- !hci_dev_test_flag(hdev, HCI_USER_CHANNEL) && |
126 |
+- test_bit(HCI_UP, &hdev->flags)) { |
127 |
+- /* Execute vendor specific shutdown routine */ |
128 |
+- if (hdev->shutdown) |
129 |
+- hdev->shutdown(hdev); |
130 |
+- } |
131 |
+- |
132 |
+ if (!test_and_clear_bit(HCI_UP, &hdev->flags)) { |
133 |
+ cancel_delayed_work_sync(&hdev->cmd_timer); |
134 |
+ hci_req_sync_unlock(hdev); |