1 |
commit: 3240e96272ce4d849415cebbeb38e1cf4ebb66fe |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Aug 7 19:13:46 2020 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 7 19:13:46 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=3240e962 |
7 |
|
8 |
Linux patch 4.14.193 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1192_linux-4.14.193.patch | 488 ++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 492 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index c4718ce..f21e8e8 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -811,6 +811,10 @@ Patch: 1191_linux-4.14.192.patch |
21 |
From: https://www.kernel.org |
22 |
Desc: Linux 4.14.192 |
23 |
|
24 |
+Patch: 1192_linux-4.14.193.patch |
25 |
+From: https://www.kernel.org |
26 |
+Desc: Linux 4.14.193 |
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/1192_linux-4.14.193.patch b/1192_linux-4.14.193.patch |
33 |
new file mode 100644 |
34 |
index 0000000..3df9868 |
35 |
--- /dev/null |
36 |
+++ b/1192_linux-4.14.193.patch |
37 |
@@ -0,0 +1,488 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index 60570fad811e..b30927f29e2b 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 4 |
45 |
+ PATCHLEVEL = 14 |
46 |
+-SUBLEVEL = 192 |
47 |
++SUBLEVEL = 193 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = Petit Gorille |
50 |
+ |
51 |
+diff --git a/arch/arm/include/asm/percpu.h b/arch/arm/include/asm/percpu.h |
52 |
+index a89b4076cde4..72821b4721ad 100644 |
53 |
+--- a/arch/arm/include/asm/percpu.h |
54 |
++++ b/arch/arm/include/asm/percpu.h |
55 |
+@@ -16,6 +16,8 @@ |
56 |
+ #ifndef _ASM_ARM_PERCPU_H_ |
57 |
+ #define _ASM_ARM_PERCPU_H_ |
58 |
+ |
59 |
++#include <asm/thread_info.h> |
60 |
++ |
61 |
+ /* |
62 |
+ * Same as asm-generic/percpu.h, except that we store the per cpu offset |
63 |
+ * in the TPIDRPRW. TPIDRPRW only exists on V6K and V7 |
64 |
+diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S |
65 |
+index 7e662bdd5cb3..932b2244e709 100644 |
66 |
+--- a/arch/arm/kernel/head-common.S |
67 |
++++ b/arch/arm/kernel/head-common.S |
68 |
+@@ -101,6 +101,7 @@ __mmap_switched: |
69 |
+ str r2, [r6] @ Save atags pointer |
70 |
+ cmp r7, #0 |
71 |
+ strne r0, [r7] @ Save control register values |
72 |
++ mov lr, #0 |
73 |
+ b start_kernel |
74 |
+ ENDPROC(__mmap_switched) |
75 |
+ |
76 |
+diff --git a/drivers/char/random.c b/drivers/char/random.c |
77 |
+index 868d2620b7ac..b202f66fc383 100644 |
78 |
+--- a/drivers/char/random.c |
79 |
++++ b/drivers/char/random.c |
80 |
+@@ -1246,6 +1246,7 @@ void add_interrupt_randomness(int irq, int irq_flags) |
81 |
+ |
82 |
+ fast_mix(fast_pool); |
83 |
+ add_interrupt_bench(cycles); |
84 |
++ this_cpu_add(net_rand_state.s1, fast_pool->pool[cycles & 3]); |
85 |
+ |
86 |
+ if (unlikely(crng_init == 0)) { |
87 |
+ if ((fast_pool->count >= 64) && |
88 |
+diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c |
89 |
+index 2b3637b40dde..70be4425ae0b 100644 |
90 |
+--- a/drivers/scsi/libsas/sas_ata.c |
91 |
++++ b/drivers/scsi/libsas/sas_ata.c |
92 |
+@@ -730,6 +730,7 @@ int sas_discover_sata(struct domain_device *dev) |
93 |
+ if (res) |
94 |
+ return res; |
95 |
+ |
96 |
++ sas_discover_event(dev->port, DISCE_PROBE); |
97 |
+ return 0; |
98 |
+ } |
99 |
+ |
100 |
+diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c |
101 |
+index d6365e2fcc60..b200edc665a5 100644 |
102 |
+--- a/drivers/scsi/libsas/sas_discover.c |
103 |
++++ b/drivers/scsi/libsas/sas_discover.c |
104 |
+@@ -221,9 +221,13 @@ void sas_notify_lldd_dev_gone(struct domain_device *dev) |
105 |
+ } |
106 |
+ } |
107 |
+ |
108 |
+-static void sas_probe_devices(struct asd_sas_port *port) |
109 |
++static void sas_probe_devices(struct work_struct *work) |
110 |
+ { |
111 |
+ struct domain_device *dev, *n; |
112 |
++ struct sas_discovery_event *ev = to_sas_discovery_event(work); |
113 |
++ struct asd_sas_port *port = ev->port; |
114 |
++ |
115 |
++ clear_bit(DISCE_PROBE, &port->disc.pending); |
116 |
+ |
117 |
+ /* devices must be domain members before link recovery and probe */ |
118 |
+ list_for_each_entry(dev, &port->disco_list, disco_list_node) { |
119 |
+@@ -299,6 +303,7 @@ int sas_discover_end_dev(struct domain_device *dev) |
120 |
+ res = sas_notify_lldd_dev_found(dev); |
121 |
+ if (res) |
122 |
+ return res; |
123 |
++ sas_discover_event(dev->port, DISCE_PROBE); |
124 |
+ |
125 |
+ return 0; |
126 |
+ } |
127 |
+@@ -357,9 +362,13 @@ static void sas_unregister_common_dev(struct asd_sas_port *port, struct domain_d |
128 |
+ sas_put_device(dev); |
129 |
+ } |
130 |
+ |
131 |
+-void sas_destruct_devices(struct asd_sas_port *port) |
132 |
++static void sas_destruct_devices(struct work_struct *work) |
133 |
+ { |
134 |
+ struct domain_device *dev, *n; |
135 |
++ struct sas_discovery_event *ev = to_sas_discovery_event(work); |
136 |
++ struct asd_sas_port *port = ev->port; |
137 |
++ |
138 |
++ clear_bit(DISCE_DESTRUCT, &port->disc.pending); |
139 |
+ |
140 |
+ list_for_each_entry_safe(dev, n, &port->destroy_list, disco_list_node) { |
141 |
+ list_del_init(&dev->disco_list_node); |
142 |
+@@ -370,16 +379,6 @@ void sas_destruct_devices(struct asd_sas_port *port) |
143 |
+ } |
144 |
+ } |
145 |
+ |
146 |
+-static void sas_destruct_ports(struct asd_sas_port *port) |
147 |
+-{ |
148 |
+- struct sas_port *sas_port, *p; |
149 |
+- |
150 |
+- list_for_each_entry_safe(sas_port, p, &port->sas_port_del_list, del_list) { |
151 |
+- list_del_init(&sas_port->del_list); |
152 |
+- sas_port_delete(sas_port); |
153 |
+- } |
154 |
+-} |
155 |
+- |
156 |
+ void sas_unregister_dev(struct asd_sas_port *port, struct domain_device *dev) |
157 |
+ { |
158 |
+ if (!test_bit(SAS_DEV_DESTROY, &dev->state) && |
159 |
+@@ -394,6 +393,7 @@ void sas_unregister_dev(struct asd_sas_port *port, struct domain_device *dev) |
160 |
+ if (!test_and_set_bit(SAS_DEV_DESTROY, &dev->state)) { |
161 |
+ sas_rphy_unlink(dev->rphy); |
162 |
+ list_move_tail(&dev->disco_list_node, &port->destroy_list); |
163 |
++ sas_discover_event(dev->port, DISCE_DESTRUCT); |
164 |
+ } |
165 |
+ } |
166 |
+ |
167 |
+@@ -499,8 +499,6 @@ static void sas_discover_domain(struct work_struct *work) |
168 |
+ port->port_dev = NULL; |
169 |
+ } |
170 |
+ |
171 |
+- sas_probe_devices(port); |
172 |
+- |
173 |
+ SAS_DPRINTK("DONE DISCOVERY on port %d, pid:%d, result:%d\n", port->id, |
174 |
+ task_pid_nr(current), error); |
175 |
+ } |
176 |
+@@ -534,10 +532,6 @@ static void sas_revalidate_domain(struct work_struct *work) |
177 |
+ port->id, task_pid_nr(current), res); |
178 |
+ out: |
179 |
+ mutex_unlock(&ha->disco_mutex); |
180 |
+- |
181 |
+- sas_destruct_devices(port); |
182 |
+- sas_destruct_ports(port); |
183 |
+- sas_probe_devices(port); |
184 |
+ } |
185 |
+ |
186 |
+ /* ---------- Events ---------- */ |
187 |
+@@ -593,8 +587,10 @@ void sas_init_disc(struct sas_discovery *disc, struct asd_sas_port *port) |
188 |
+ static const work_func_t sas_event_fns[DISC_NUM_EVENTS] = { |
189 |
+ [DISCE_DISCOVER_DOMAIN] = sas_discover_domain, |
190 |
+ [DISCE_REVALIDATE_DOMAIN] = sas_revalidate_domain, |
191 |
++ [DISCE_PROBE] = sas_probe_devices, |
192 |
+ [DISCE_SUSPEND] = sas_suspend_devices, |
193 |
+ [DISCE_RESUME] = sas_resume_devices, |
194 |
++ [DISCE_DESTRUCT] = sas_destruct_devices, |
195 |
+ }; |
196 |
+ |
197 |
+ disc->pending = 0; |
198 |
+diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c |
199 |
+index 84df6cf46760..f77d72f01da9 100644 |
200 |
+--- a/drivers/scsi/libsas/sas_expander.c |
201 |
++++ b/drivers/scsi/libsas/sas_expander.c |
202 |
+@@ -1946,8 +1946,7 @@ static void sas_unregister_devs_sas_addr(struct domain_device *parent, |
203 |
+ sas_port_delete_phy(phy->port, phy->phy); |
204 |
+ sas_device_set_phy(found, phy->port); |
205 |
+ if (phy->port->num_phys == 0) |
206 |
+- list_add_tail(&phy->port->del_list, |
207 |
+- &parent->port->sas_port_del_list); |
208 |
++ sas_port_delete(phy->port); |
209 |
+ phy->port = NULL; |
210 |
+ } |
211 |
+ } |
212 |
+@@ -2157,7 +2156,7 @@ int sas_ex_revalidate_domain(struct domain_device *port_dev) |
213 |
+ struct domain_device *dev = NULL; |
214 |
+ |
215 |
+ res = sas_find_bcast_dev(port_dev, &dev); |
216 |
+- if (res == 0 && dev) { |
217 |
++ while (res == 0 && dev) { |
218 |
+ struct expander_device *ex = &dev->ex_dev; |
219 |
+ int i = 0, phy_id; |
220 |
+ |
221 |
+@@ -2169,6 +2168,9 @@ int sas_ex_revalidate_domain(struct domain_device *port_dev) |
222 |
+ res = sas_rediscover(dev, phy_id); |
223 |
+ i = phy_id + 1; |
224 |
+ } while (i < ex->num_phys); |
225 |
++ |
226 |
++ dev = NULL; |
227 |
++ res = sas_find_bcast_dev(port_dev, &dev); |
228 |
+ } |
229 |
+ return res; |
230 |
+ } |
231 |
+diff --git a/drivers/scsi/libsas/sas_internal.h b/drivers/scsi/libsas/sas_internal.h |
232 |
+index f3449fde9c5f..c07e08136491 100644 |
233 |
+--- a/drivers/scsi/libsas/sas_internal.h |
234 |
++++ b/drivers/scsi/libsas/sas_internal.h |
235 |
+@@ -98,7 +98,6 @@ int sas_try_ata_reset(struct asd_sas_phy *phy); |
236 |
+ void sas_hae_reset(struct work_struct *work); |
237 |
+ |
238 |
+ void sas_free_device(struct kref *kref); |
239 |
+-void sas_destruct_devices(struct asd_sas_port *port); |
240 |
+ |
241 |
+ #ifdef CONFIG_SCSI_SAS_HOST_SMP |
242 |
+ extern void sas_smp_host_handler(struct bsg_job *job, struct Scsi_Host *shost); |
243 |
+diff --git a/drivers/scsi/libsas/sas_port.c b/drivers/scsi/libsas/sas_port.c |
244 |
+index 5d3244c8f280..d3c5297c6c89 100644 |
245 |
+--- a/drivers/scsi/libsas/sas_port.c |
246 |
++++ b/drivers/scsi/libsas/sas_port.c |
247 |
+@@ -66,7 +66,6 @@ static void sas_resume_port(struct asd_sas_phy *phy) |
248 |
+ rc = sas_notify_lldd_dev_found(dev); |
249 |
+ if (rc) { |
250 |
+ sas_unregister_dev(port, dev); |
251 |
+- sas_destruct_devices(port); |
252 |
+ continue; |
253 |
+ } |
254 |
+ |
255 |
+@@ -220,7 +219,6 @@ void sas_deform_port(struct asd_sas_phy *phy, int gone) |
256 |
+ |
257 |
+ if (port->num_phys == 1) { |
258 |
+ sas_unregister_domain_devices(port, gone); |
259 |
+- sas_destruct_devices(port); |
260 |
+ sas_port_delete(port->port); |
261 |
+ port->port = NULL; |
262 |
+ } else { |
263 |
+@@ -325,7 +323,6 @@ static void sas_init_port(struct asd_sas_port *port, |
264 |
+ INIT_LIST_HEAD(&port->dev_list); |
265 |
+ INIT_LIST_HEAD(&port->disco_list); |
266 |
+ INIT_LIST_HEAD(&port->destroy_list); |
267 |
+- INIT_LIST_HEAD(&port->sas_port_del_list); |
268 |
+ spin_lock_init(&port->phy_list_lock); |
269 |
+ INIT_LIST_HEAD(&port->phy_list); |
270 |
+ port->ha = sas_ha; |
271 |
+diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c |
272 |
+index 5f03a4fabeaa..845b8620afcf 100644 |
273 |
+--- a/fs/ext4/inode.c |
274 |
++++ b/fs/ext4/inode.c |
275 |
+@@ -3794,6 +3794,11 @@ static ssize_t ext4_direct_IO_read(struct kiocb *iocb, struct iov_iter *iter) |
276 |
+ struct inode *inode = mapping->host; |
277 |
+ size_t count = iov_iter_count(iter); |
278 |
+ ssize_t ret; |
279 |
++ loff_t offset = iocb->ki_pos; |
280 |
++ loff_t size = i_size_read(inode); |
281 |
++ |
282 |
++ if (offset >= size) |
283 |
++ return 0; |
284 |
+ |
285 |
+ /* |
286 |
+ * Shared inode_lock is enough for us - it protects against concurrent |
287 |
+diff --git a/include/linux/prandom.h b/include/linux/prandom.h |
288 |
+new file mode 100644 |
289 |
+index 000000000000..aa16e6468f91 |
290 |
+--- /dev/null |
291 |
++++ b/include/linux/prandom.h |
292 |
+@@ -0,0 +1,78 @@ |
293 |
++/* SPDX-License-Identifier: GPL-2.0 */ |
294 |
++/* |
295 |
++ * include/linux/prandom.h |
296 |
++ * |
297 |
++ * Include file for the fast pseudo-random 32-bit |
298 |
++ * generation. |
299 |
++ */ |
300 |
++#ifndef _LINUX_PRANDOM_H |
301 |
++#define _LINUX_PRANDOM_H |
302 |
++ |
303 |
++#include <linux/types.h> |
304 |
++#include <linux/percpu.h> |
305 |
++ |
306 |
++u32 prandom_u32(void); |
307 |
++void prandom_bytes(void *buf, size_t nbytes); |
308 |
++void prandom_seed(u32 seed); |
309 |
++void prandom_reseed_late(void); |
310 |
++ |
311 |
++struct rnd_state { |
312 |
++ __u32 s1, s2, s3, s4; |
313 |
++}; |
314 |
++ |
315 |
++DECLARE_PER_CPU(struct rnd_state, net_rand_state); |
316 |
++ |
317 |
++u32 prandom_u32_state(struct rnd_state *state); |
318 |
++void prandom_bytes_state(struct rnd_state *state, void *buf, size_t nbytes); |
319 |
++void prandom_seed_full_state(struct rnd_state __percpu *pcpu_state); |
320 |
++ |
321 |
++#define prandom_init_once(pcpu_state) \ |
322 |
++ DO_ONCE(prandom_seed_full_state, (pcpu_state)) |
323 |
++ |
324 |
++/** |
325 |
++ * prandom_u32_max - returns a pseudo-random number in interval [0, ep_ro) |
326 |
++ * @ep_ro: right open interval endpoint |
327 |
++ * |
328 |
++ * Returns a pseudo-random number that is in interval [0, ep_ro). Note |
329 |
++ * that the result depends on PRNG being well distributed in [0, ~0U] |
330 |
++ * u32 space. Here we use maximally equidistributed combined Tausworthe |
331 |
++ * generator, that is, prandom_u32(). This is useful when requesting a |
332 |
++ * random index of an array containing ep_ro elements, for example. |
333 |
++ * |
334 |
++ * Returns: pseudo-random number in interval [0, ep_ro) |
335 |
++ */ |
336 |
++static inline u32 prandom_u32_max(u32 ep_ro) |
337 |
++{ |
338 |
++ return (u32)(((u64) prandom_u32() * ep_ro) >> 32); |
339 |
++} |
340 |
++ |
341 |
++/* |
342 |
++ * Handle minimum values for seeds |
343 |
++ */ |
344 |
++static inline u32 __seed(u32 x, u32 m) |
345 |
++{ |
346 |
++ return (x < m) ? x + m : x; |
347 |
++} |
348 |
++ |
349 |
++/** |
350 |
++ * prandom_seed_state - set seed for prandom_u32_state(). |
351 |
++ * @state: pointer to state structure to receive the seed. |
352 |
++ * @seed: arbitrary 64-bit value to use as a seed. |
353 |
++ */ |
354 |
++static inline void prandom_seed_state(struct rnd_state *state, u64 seed) |
355 |
++{ |
356 |
++ u32 i = (seed >> 32) ^ (seed << 10) ^ seed; |
357 |
++ |
358 |
++ state->s1 = __seed(i, 2U); |
359 |
++ state->s2 = __seed(i, 8U); |
360 |
++ state->s3 = __seed(i, 16U); |
361 |
++ state->s4 = __seed(i, 128U); |
362 |
++} |
363 |
++ |
364 |
++/* Pseudo random number generator from numerical recipes. */ |
365 |
++static inline u32 next_pseudo_random32(u32 seed) |
366 |
++{ |
367 |
++ return seed * 1664525 + 1013904223; |
368 |
++} |
369 |
++ |
370 |
++#endif |
371 |
+diff --git a/include/linux/random.h b/include/linux/random.h |
372 |
+index 4024f7d9c77d..8eda8c0cbba7 100644 |
373 |
+--- a/include/linux/random.h |
374 |
++++ b/include/linux/random.h |
375 |
+@@ -107,61 +107,12 @@ declare_get_random_var_wait(long) |
376 |
+ |
377 |
+ unsigned long randomize_page(unsigned long start, unsigned long range); |
378 |
+ |
379 |
+-u32 prandom_u32(void); |
380 |
+-void prandom_bytes(void *buf, size_t nbytes); |
381 |
+-void prandom_seed(u32 seed); |
382 |
+-void prandom_reseed_late(void); |
383 |
+- |
384 |
+-struct rnd_state { |
385 |
+- __u32 s1, s2, s3, s4; |
386 |
+-}; |
387 |
+- |
388 |
+-u32 prandom_u32_state(struct rnd_state *state); |
389 |
+-void prandom_bytes_state(struct rnd_state *state, void *buf, size_t nbytes); |
390 |
+-void prandom_seed_full_state(struct rnd_state __percpu *pcpu_state); |
391 |
+- |
392 |
+-#define prandom_init_once(pcpu_state) \ |
393 |
+- DO_ONCE(prandom_seed_full_state, (pcpu_state)) |
394 |
+- |
395 |
+-/** |
396 |
+- * prandom_u32_max - returns a pseudo-random number in interval [0, ep_ro) |
397 |
+- * @ep_ro: right open interval endpoint |
398 |
+- * |
399 |
+- * Returns a pseudo-random number that is in interval [0, ep_ro). Note |
400 |
+- * that the result depends on PRNG being well distributed in [0, ~0U] |
401 |
+- * u32 space. Here we use maximally equidistributed combined Tausworthe |
402 |
+- * generator, that is, prandom_u32(). This is useful when requesting a |
403 |
+- * random index of an array containing ep_ro elements, for example. |
404 |
+- * |
405 |
+- * Returns: pseudo-random number in interval [0, ep_ro) |
406 |
+- */ |
407 |
+-static inline u32 prandom_u32_max(u32 ep_ro) |
408 |
+-{ |
409 |
+- return (u32)(((u64) prandom_u32() * ep_ro) >> 32); |
410 |
+-} |
411 |
+- |
412 |
+ /* |
413 |
+- * Handle minimum values for seeds |
414 |
++ * This is designed to be standalone for just prandom |
415 |
++ * users, but for now we include it from <linux/random.h> |
416 |
++ * for legacy reasons. |
417 |
+ */ |
418 |
+-static inline u32 __seed(u32 x, u32 m) |
419 |
+-{ |
420 |
+- return (x < m) ? x + m : x; |
421 |
+-} |
422 |
+- |
423 |
+-/** |
424 |
+- * prandom_seed_state - set seed for prandom_u32_state(). |
425 |
+- * @state: pointer to state structure to receive the seed. |
426 |
+- * @seed: arbitrary 64-bit value to use as a seed. |
427 |
+- */ |
428 |
+-static inline void prandom_seed_state(struct rnd_state *state, u64 seed) |
429 |
+-{ |
430 |
+- u32 i = (seed >> 32) ^ (seed << 10) ^ seed; |
431 |
+- |
432 |
+- state->s1 = __seed(i, 2U); |
433 |
+- state->s2 = __seed(i, 8U); |
434 |
+- state->s3 = __seed(i, 16U); |
435 |
+- state->s4 = __seed(i, 128U); |
436 |
+-} |
437 |
++#include <linux/prandom.h> |
438 |
+ |
439 |
+ #ifdef CONFIG_ARCH_RANDOM |
440 |
+ # include <asm/archrandom.h> |
441 |
+@@ -192,10 +143,4 @@ static inline bool arch_has_random_seed(void) |
442 |
+ } |
443 |
+ #endif |
444 |
+ |
445 |
+-/* Pseudo random number generator from numerical recipes. */ |
446 |
+-static inline u32 next_pseudo_random32(u32 seed) |
447 |
+-{ |
448 |
+- return seed * 1664525 + 1013904223; |
449 |
+-} |
450 |
+- |
451 |
+ #endif /* _LINUX_RANDOM_H */ |
452 |
+diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h |
453 |
+index 1b1cf9eff3b5..a966d281dedc 100644 |
454 |
+--- a/include/scsi/libsas.h |
455 |
++++ b/include/scsi/libsas.h |
456 |
+@@ -87,8 +87,10 @@ enum discover_event { |
457 |
+ DISCE_DISCOVER_DOMAIN = 0U, |
458 |
+ DISCE_REVALIDATE_DOMAIN = 1, |
459 |
+ DISCE_PORT_GONE = 2, |
460 |
++ DISCE_PROBE = 3, |
461 |
+ DISCE_SUSPEND = 4, |
462 |
+ DISCE_RESUME = 5, |
463 |
++ DISCE_DESTRUCT = 6, |
464 |
+ DISC_NUM_EVENTS = 7, |
465 |
+ }; |
466 |
+ |
467 |
+@@ -267,7 +269,6 @@ struct asd_sas_port { |
468 |
+ struct list_head dev_list; |
469 |
+ struct list_head disco_list; |
470 |
+ struct list_head destroy_list; |
471 |
+- struct list_head sas_port_del_list; |
472 |
+ enum sas_linkrate linkrate; |
473 |
+ |
474 |
+ struct sas_work work; |
475 |
+diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h |
476 |
+index 05ec927a3c72..62895b405933 100644 |
477 |
+--- a/include/scsi/scsi_transport_sas.h |
478 |
++++ b/include/scsi/scsi_transport_sas.h |
479 |
+@@ -156,7 +156,6 @@ struct sas_port { |
480 |
+ |
481 |
+ struct mutex phy_list_mutex; |
482 |
+ struct list_head phy_list; |
483 |
+- struct list_head del_list; /* libsas only */ |
484 |
+ }; |
485 |
+ |
486 |
+ #define dev_to_sas_port(d) \ |
487 |
+diff --git a/kernel/time/timer.c b/kernel/time/timer.c |
488 |
+index 7e88c87c3554..d4bc272e03ee 100644 |
489 |
+--- a/kernel/time/timer.c |
490 |
++++ b/kernel/time/timer.c |
491 |
+@@ -44,6 +44,7 @@ |
492 |
+ #include <linux/sched/debug.h> |
493 |
+ #include <linux/slab.h> |
494 |
+ #include <linux/compat.h> |
495 |
++#include <linux/random.h> |
496 |
+ |
497 |
+ #include <linux/uaccess.h> |
498 |
+ #include <asm/unistd.h> |
499 |
+@@ -1595,6 +1596,13 @@ void update_process_times(int user_tick) |
500 |
+ scheduler_tick(); |
501 |
+ if (IS_ENABLED(CONFIG_POSIX_TIMERS)) |
502 |
+ run_posix_cpu_timers(p); |
503 |
++ |
504 |
++ /* The current CPU might make use of net randoms without receiving IRQs |
505 |
++ * to renew them often enough. Let's update the net_rand_state from a |
506 |
++ * non-constant value that's not affine to the number of calls to make |
507 |
++ * sure it's updated when there's some activity (we don't care in idle). |
508 |
++ */ |
509 |
++ this_cpu_add(net_rand_state.s1, rol32(jiffies, 24) + user_tick); |
510 |
+ } |
511 |
+ |
512 |
+ /** |
513 |
+diff --git a/lib/random32.c b/lib/random32.c |
514 |
+index 0a90cb0e0fb6..6e2c48ab8072 100644 |
515 |
+--- a/lib/random32.c |
516 |
++++ b/lib/random32.c |
517 |
+@@ -48,7 +48,7 @@ static inline void prandom_state_selftest(void) |
518 |
+ } |
519 |
+ #endif |
520 |
+ |
521 |
+-static DEFINE_PER_CPU(struct rnd_state, net_rand_state) __latent_entropy; |
522 |
++DEFINE_PER_CPU(struct rnd_state, net_rand_state); |
523 |
+ |
524 |
+ /** |
525 |
+ * prandom_u32_state - seeded pseudo-random number generator. |