1 |
commit: 5a0a86cfcc9e572249c81e50435857ca033ce266 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 7 18:11:17 2018 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 14 13:48:40 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=5a0a86cf |
7 |
|
8 |
Linux patch 4.14.61 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1060_linux-4.14.61.patch | 909 +++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 913 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 685cb5d..64029e1 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -283,6 +283,10 @@ Patch: 1059_linux-4.14.60.patch |
21 |
From: http://www.kernel.org |
22 |
Desc: Linux 4.14.60 |
23 |
|
24 |
+Patch: 1060_linux-4.14.61.patch |
25 |
+From: http://www.kernel.org |
26 |
+Desc: Linux 4.14.61 |
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/1060_linux-4.14.61.patch b/1060_linux-4.14.61.patch |
33 |
new file mode 100644 |
34 |
index 0000000..d7a4083 |
35 |
--- /dev/null |
36 |
+++ b/1060_linux-4.14.61.patch |
37 |
@@ -0,0 +1,909 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index 5b48ec630990..4bd65eabd298 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 = 60 |
47 |
++SUBLEVEL = 61 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = Petit Gorille |
50 |
+ |
51 |
+diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S |
52 |
+index f7bfa701219b..0fae7096ae23 100644 |
53 |
+--- a/arch/x86/entry/entry_64.S |
54 |
++++ b/arch/x86/entry/entry_64.S |
55 |
+@@ -933,7 +933,7 @@ ENTRY(\sym) |
56 |
+ |
57 |
+ call \do_sym |
58 |
+ |
59 |
+- jmp error_exit /* %ebx: no swapgs flag */ |
60 |
++ jmp error_exit |
61 |
+ .endif |
62 |
+ END(\sym) |
63 |
+ .endm |
64 |
+@@ -1166,7 +1166,6 @@ END(paranoid_exit) |
65 |
+ |
66 |
+ /* |
67 |
+ * Save all registers in pt_regs, and switch GS if needed. |
68 |
+- * Return: EBX=0: came from user mode; EBX=1: otherwise |
69 |
+ */ |
70 |
+ ENTRY(error_entry) |
71 |
+ UNWIND_HINT_FUNC |
72 |
+@@ -1213,7 +1212,6 @@ ENTRY(error_entry) |
73 |
+ * for these here too. |
74 |
+ */ |
75 |
+ .Lerror_kernelspace: |
76 |
+- incl %ebx |
77 |
+ leaq native_irq_return_iret(%rip), %rcx |
78 |
+ cmpq %rcx, RIP+8(%rsp) |
79 |
+ je .Lerror_bad_iret |
80 |
+@@ -1247,28 +1245,20 @@ ENTRY(error_entry) |
81 |
+ |
82 |
+ /* |
83 |
+ * Pretend that the exception came from user mode: set up pt_regs |
84 |
+- * as if we faulted immediately after IRET and clear EBX so that |
85 |
+- * error_exit knows that we will be returning to user mode. |
86 |
++ * as if we faulted immediately after IRET. |
87 |
+ */ |
88 |
+ mov %rsp, %rdi |
89 |
+ call fixup_bad_iret |
90 |
+ mov %rax, %rsp |
91 |
+- decl %ebx |
92 |
+ jmp .Lerror_entry_from_usermode_after_swapgs |
93 |
+ END(error_entry) |
94 |
+ |
95 |
+- |
96 |
+-/* |
97 |
+- * On entry, EBX is a "return to kernel mode" flag: |
98 |
+- * 1: already in kernel mode, don't need SWAPGS |
99 |
+- * 0: user gsbase is loaded, we need SWAPGS and standard preparation for return to usermode |
100 |
+- */ |
101 |
+ ENTRY(error_exit) |
102 |
+ UNWIND_HINT_REGS |
103 |
+ DISABLE_INTERRUPTS(CLBR_ANY) |
104 |
+ TRACE_IRQS_OFF |
105 |
+- testl %ebx, %ebx |
106 |
+- jnz retint_kernel |
107 |
++ testb $3, CS(%rsp) |
108 |
++ jz retint_kernel |
109 |
+ jmp retint_user |
110 |
+ END(error_exit) |
111 |
+ |
112 |
+diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c |
113 |
+index ebdcc368a2d3..f48a51335538 100644 |
114 |
+--- a/arch/x86/kernel/apic/apic.c |
115 |
++++ b/arch/x86/kernel/apic/apic.c |
116 |
+@@ -580,6 +580,9 @@ static u32 skx_deadline_rev(void) |
117 |
+ case 0x04: return 0x02000014; |
118 |
+ } |
119 |
+ |
120 |
++ if (boot_cpu_data.x86_stepping > 4) |
121 |
++ return 0; |
122 |
++ |
123 |
+ return ~0U; |
124 |
+ } |
125 |
+ |
126 |
+diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c |
127 |
+index 90747865205d..8d000fde1414 100644 |
128 |
+--- a/arch/x86/kvm/vmx.c |
129 |
++++ b/arch/x86/kvm/vmx.c |
130 |
+@@ -7354,6 +7354,8 @@ static int enter_vmx_operation(struct kvm_vcpu *vcpu) |
131 |
+ HRTIMER_MODE_REL_PINNED); |
132 |
+ vmx->nested.preemption_timer.function = vmx_preemption_timer_fn; |
133 |
+ |
134 |
++ vmx->nested.vpid02 = allocate_vpid(); |
135 |
++ |
136 |
+ vmx->nested.vmxon = true; |
137 |
+ return 0; |
138 |
+ |
139 |
+@@ -9802,10 +9804,8 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id) |
140 |
+ goto free_vmcs; |
141 |
+ } |
142 |
+ |
143 |
+- if (nested) { |
144 |
++ if (nested) |
145 |
+ nested_vmx_setup_ctls_msrs(vmx); |
146 |
+- vmx->nested.vpid02 = allocate_vpid(); |
147 |
+- } |
148 |
+ |
149 |
+ vmx->nested.posted_intr_nv = -1; |
150 |
+ vmx->nested.current_vmptr = -1ull; |
151 |
+@@ -9822,7 +9822,6 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id) |
152 |
+ return &vmx->vcpu; |
153 |
+ |
154 |
+ free_vmcs: |
155 |
+- free_vpid(vmx->nested.vpid02); |
156 |
+ free_loaded_vmcs(vmx->loaded_vmcs); |
157 |
+ free_msrs: |
158 |
+ kfree(vmx->guest_msrs); |
159 |
+diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c |
160 |
+index c939f18f70cc..7685f557dcc0 100644 |
161 |
+--- a/drivers/crypto/padlock-aes.c |
162 |
++++ b/drivers/crypto/padlock-aes.c |
163 |
+@@ -266,6 +266,8 @@ static inline void padlock_xcrypt_ecb(const u8 *input, u8 *output, void *key, |
164 |
+ return; |
165 |
+ } |
166 |
+ |
167 |
++ count -= initial; |
168 |
++ |
169 |
+ if (initial) |
170 |
+ asm volatile (".byte 0xf3,0x0f,0xa7,0xc8" /* rep xcryptecb */ |
171 |
+ : "+S"(input), "+D"(output) |
172 |
+@@ -273,7 +275,7 @@ static inline void padlock_xcrypt_ecb(const u8 *input, u8 *output, void *key, |
173 |
+ |
174 |
+ asm volatile (".byte 0xf3,0x0f,0xa7,0xc8" /* rep xcryptecb */ |
175 |
+ : "+S"(input), "+D"(output) |
176 |
+- : "d"(control_word), "b"(key), "c"(count - initial)); |
177 |
++ : "d"(control_word), "b"(key), "c"(count)); |
178 |
+ } |
179 |
+ |
180 |
+ static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key, |
181 |
+@@ -284,6 +286,8 @@ static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key, |
182 |
+ if (count < cbc_fetch_blocks) |
183 |
+ return cbc_crypt(input, output, key, iv, control_word, count); |
184 |
+ |
185 |
++ count -= initial; |
186 |
++ |
187 |
+ if (initial) |
188 |
+ asm volatile (".byte 0xf3,0x0f,0xa7,0xd0" /* rep xcryptcbc */ |
189 |
+ : "+S" (input), "+D" (output), "+a" (iv) |
190 |
+@@ -291,7 +295,7 @@ static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key, |
191 |
+ |
192 |
+ asm volatile (".byte 0xf3,0x0f,0xa7,0xd0" /* rep xcryptcbc */ |
193 |
+ : "+S" (input), "+D" (output), "+a" (iv) |
194 |
+- : "d" (control_word), "b" (key), "c" (count-initial)); |
195 |
++ : "d" (control_word), "b" (key), "c" (count)); |
196 |
+ return iv; |
197 |
+ } |
198 |
+ |
199 |
+diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c |
200 |
+index 77c56264c05b..17590cb2b80d 100644 |
201 |
+--- a/drivers/gpu/drm/vc4/vc4_plane.c |
202 |
++++ b/drivers/gpu/drm/vc4/vc4_plane.c |
203 |
+@@ -352,6 +352,9 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) |
204 |
+ vc4_state->x_scaling[0] = VC4_SCALING_TPZ; |
205 |
+ if (vc4_state->y_scaling[0] == VC4_SCALING_NONE) |
206 |
+ vc4_state->y_scaling[0] = VC4_SCALING_TPZ; |
207 |
++ } else { |
208 |
++ vc4_state->x_scaling[1] = VC4_SCALING_NONE; |
209 |
++ vc4_state->y_scaling[1] = VC4_SCALING_NONE; |
210 |
+ } |
211 |
+ |
212 |
+ vc4_state->is_unity = (vc4_state->x_scaling[0] == VC4_SCALING_NONE && |
213 |
+diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c |
214 |
+index b8229d7b0ff5..f836ed1dd300 100644 |
215 |
+--- a/drivers/infiniband/core/uverbs_cmd.c |
216 |
++++ b/drivers/infiniband/core/uverbs_cmd.c |
217 |
+@@ -1981,15 +1981,64 @@ static int modify_qp(struct ib_uverbs_file *file, |
218 |
+ goto release_qp; |
219 |
+ } |
220 |
+ |
221 |
+- if ((cmd->base.attr_mask & IB_QP_AV) && |
222 |
+- !rdma_is_port_valid(qp->device, cmd->base.dest.port_num)) { |
223 |
+- ret = -EINVAL; |
224 |
+- goto release_qp; |
225 |
++ if ((cmd->base.attr_mask & IB_QP_AV)) { |
226 |
++ if (!rdma_is_port_valid(qp->device, cmd->base.dest.port_num)) { |
227 |
++ ret = -EINVAL; |
228 |
++ goto release_qp; |
229 |
++ } |
230 |
++ |
231 |
++ if (cmd->base.attr_mask & IB_QP_STATE && |
232 |
++ cmd->base.qp_state == IB_QPS_RTR) { |
233 |
++ /* We are in INIT->RTR TRANSITION (if we are not, |
234 |
++ * this transition will be rejected in subsequent checks). |
235 |
++ * In the INIT->RTR transition, we cannot have IB_QP_PORT set, |
236 |
++ * but the IB_QP_STATE flag is required. |
237 |
++ * |
238 |
++ * Since kernel 3.14 (commit dbf727de7440), the uverbs driver, |
239 |
++ * when IB_QP_AV is set, has required inclusion of a valid |
240 |
++ * port number in the primary AV. (AVs are created and handled |
241 |
++ * differently for infiniband and ethernet (RoCE) ports). |
242 |
++ * |
243 |
++ * Check the port number included in the primary AV against |
244 |
++ * the port number in the qp struct, which was set (and saved) |
245 |
++ * in the RST->INIT transition. |
246 |
++ */ |
247 |
++ if (cmd->base.dest.port_num != qp->real_qp->port) { |
248 |
++ ret = -EINVAL; |
249 |
++ goto release_qp; |
250 |
++ } |
251 |
++ } else { |
252 |
++ /* We are in SQD->SQD. (If we are not, this transition will |
253 |
++ * be rejected later in the verbs layer checks). |
254 |
++ * Check for both IB_QP_PORT and IB_QP_AV, these can be set |
255 |
++ * together in the SQD->SQD transition. |
256 |
++ * |
257 |
++ * If only IP_QP_AV was set, add in IB_QP_PORT as well (the |
258 |
++ * verbs layer driver does not track primary port changes |
259 |
++ * resulting from path migration. Thus, in SQD, if the primary |
260 |
++ * AV is modified, the primary port should also be modified). |
261 |
++ * |
262 |
++ * Note that in this transition, the IB_QP_STATE flag |
263 |
++ * is not allowed. |
264 |
++ */ |
265 |
++ if (((cmd->base.attr_mask & (IB_QP_AV | IB_QP_PORT)) |
266 |
++ == (IB_QP_AV | IB_QP_PORT)) && |
267 |
++ cmd->base.port_num != cmd->base.dest.port_num) { |
268 |
++ ret = -EINVAL; |
269 |
++ goto release_qp; |
270 |
++ } |
271 |
++ if ((cmd->base.attr_mask & (IB_QP_AV | IB_QP_PORT)) |
272 |
++ == IB_QP_AV) { |
273 |
++ cmd->base.attr_mask |= IB_QP_PORT; |
274 |
++ cmd->base.port_num = cmd->base.dest.port_num; |
275 |
++ } |
276 |
++ } |
277 |
+ } |
278 |
+ |
279 |
+ if ((cmd->base.attr_mask & IB_QP_ALT_PATH) && |
280 |
+ (!rdma_is_port_valid(qp->device, cmd->base.alt_port_num) || |
281 |
+- !rdma_is_port_valid(qp->device, cmd->base.alt_dest.port_num))) { |
282 |
++ !rdma_is_port_valid(qp->device, cmd->base.alt_dest.port_num) || |
283 |
++ cmd->base.alt_port_num != cmd->base.alt_dest.port_num)) { |
284 |
+ ret = -EINVAL; |
285 |
+ goto release_qp; |
286 |
+ } |
287 |
+diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c |
288 |
+index 00245b73c224..15aedb64a02b 100644 |
289 |
+--- a/drivers/net/bonding/bond_main.c |
290 |
++++ b/drivers/net/bonding/bond_main.c |
291 |
+@@ -1687,6 +1687,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) |
292 |
+ goto err_upper_unlink; |
293 |
+ } |
294 |
+ |
295 |
++ bond->nest_level = dev_get_nest_level(bond_dev) + 1; |
296 |
++ |
297 |
+ /* If the mode uses primary, then the following is handled by |
298 |
+ * bond_change_active_slave(). |
299 |
+ */ |
300 |
+@@ -1734,7 +1736,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) |
301 |
+ if (bond_mode_uses_xmit_hash(bond)) |
302 |
+ bond_update_slave_arr(bond, NULL); |
303 |
+ |
304 |
+- bond->nest_level = dev_get_nest_level(bond_dev); |
305 |
+ |
306 |
+ netdev_info(bond_dev, "Enslaving %s as %s interface with %s link\n", |
307 |
+ slave_dev->name, |
308 |
+@@ -3379,6 +3380,13 @@ static void bond_fold_stats(struct rtnl_link_stats64 *_res, |
309 |
+ } |
310 |
+ } |
311 |
+ |
312 |
++static int bond_get_nest_level(struct net_device *bond_dev) |
313 |
++{ |
314 |
++ struct bonding *bond = netdev_priv(bond_dev); |
315 |
++ |
316 |
++ return bond->nest_level; |
317 |
++} |
318 |
++ |
319 |
+ static void bond_get_stats(struct net_device *bond_dev, |
320 |
+ struct rtnl_link_stats64 *stats) |
321 |
+ { |
322 |
+@@ -3387,7 +3395,7 @@ static void bond_get_stats(struct net_device *bond_dev, |
323 |
+ struct list_head *iter; |
324 |
+ struct slave *slave; |
325 |
+ |
326 |
+- spin_lock(&bond->stats_lock); |
327 |
++ spin_lock_nested(&bond->stats_lock, bond_get_nest_level(bond_dev)); |
328 |
+ memcpy(stats, &bond->bond_stats, sizeof(*stats)); |
329 |
+ |
330 |
+ rcu_read_lock(); |
331 |
+@@ -4182,6 +4190,7 @@ static const struct net_device_ops bond_netdev_ops = { |
332 |
+ .ndo_neigh_setup = bond_neigh_setup, |
333 |
+ .ndo_vlan_rx_add_vid = bond_vlan_rx_add_vid, |
334 |
+ .ndo_vlan_rx_kill_vid = bond_vlan_rx_kill_vid, |
335 |
++ .ndo_get_lock_subclass = bond_get_nest_level, |
336 |
+ #ifdef CONFIG_NET_POLL_CONTROLLER |
337 |
+ .ndo_netpoll_setup = bond_netpoll_setup, |
338 |
+ .ndo_netpoll_cleanup = bond_netpoll_cleanup, |
339 |
+@@ -4680,6 +4689,7 @@ static int bond_init(struct net_device *bond_dev) |
340 |
+ if (!bond->wq) |
341 |
+ return -ENOMEM; |
342 |
+ |
343 |
++ bond->nest_level = SINGLE_DEPTH_NESTING; |
344 |
+ netdev_lockdep_set_classes(bond_dev); |
345 |
+ |
346 |
+ list_add_tail(&bond->bond_list, &bn->dev_list); |
347 |
+diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c |
348 |
+index b00358297424..d0846ae9e0e4 100644 |
349 |
+--- a/drivers/net/can/usb/ems_usb.c |
350 |
++++ b/drivers/net/can/usb/ems_usb.c |
351 |
+@@ -1071,6 +1071,7 @@ static void ems_usb_disconnect(struct usb_interface *intf) |
352 |
+ usb_free_urb(dev->intr_urb); |
353 |
+ |
354 |
+ kfree(dev->intr_in_buffer); |
355 |
++ kfree(dev->tx_msg_buffer); |
356 |
+ } |
357 |
+ } |
358 |
+ |
359 |
+diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c |
360 |
+index 667415301066..f697084937c3 100644 |
361 |
+--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c |
362 |
++++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c |
363 |
+@@ -1616,7 +1616,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev) |
364 |
+ int vport_num; |
365 |
+ int err; |
366 |
+ |
367 |
+- if (!MLX5_VPORT_MANAGER(dev)) |
368 |
++ if (!MLX5_ESWITCH_MANAGER(dev)) |
369 |
+ return 0; |
370 |
+ |
371 |
+ esw_info(dev, |
372 |
+@@ -1689,7 +1689,7 @@ abort: |
373 |
+ |
374 |
+ void mlx5_eswitch_cleanup(struct mlx5_eswitch *esw) |
375 |
+ { |
376 |
+- if (!esw || !MLX5_VPORT_MANAGER(esw->dev)) |
377 |
++ if (!esw || !MLX5_ESWITCH_MANAGER(esw->dev)) |
378 |
+ return; |
379 |
+ |
380 |
+ esw_info(esw->dev, "cleanup\n"); |
381 |
+diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c |
382 |
+index 8d375e51a526..6a393b16a1fc 100644 |
383 |
+--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c |
384 |
++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c |
385 |
+@@ -257,7 +257,7 @@ static int stmmac_pci_probe(struct pci_dev *pdev, |
386 |
+ return -ENOMEM; |
387 |
+ |
388 |
+ /* Enable pci device */ |
389 |
+- ret = pcim_enable_device(pdev); |
390 |
++ ret = pci_enable_device(pdev); |
391 |
+ if (ret) { |
392 |
+ dev_err(&pdev->dev, "%s: ERROR: failed to enable device\n", |
393 |
+ __func__); |
394 |
+@@ -300,9 +300,45 @@ static int stmmac_pci_probe(struct pci_dev *pdev, |
395 |
+ static void stmmac_pci_remove(struct pci_dev *pdev) |
396 |
+ { |
397 |
+ stmmac_dvr_remove(&pdev->dev); |
398 |
++ pci_disable_device(pdev); |
399 |
+ } |
400 |
+ |
401 |
+-static SIMPLE_DEV_PM_OPS(stmmac_pm_ops, stmmac_suspend, stmmac_resume); |
402 |
++static int stmmac_pci_suspend(struct device *dev) |
403 |
++{ |
404 |
++ struct pci_dev *pdev = to_pci_dev(dev); |
405 |
++ int ret; |
406 |
++ |
407 |
++ ret = stmmac_suspend(dev); |
408 |
++ if (ret) |
409 |
++ return ret; |
410 |
++ |
411 |
++ ret = pci_save_state(pdev); |
412 |
++ if (ret) |
413 |
++ return ret; |
414 |
++ |
415 |
++ pci_disable_device(pdev); |
416 |
++ pci_wake_from_d3(pdev, true); |
417 |
++ return 0; |
418 |
++} |
419 |
++ |
420 |
++static int stmmac_pci_resume(struct device *dev) |
421 |
++{ |
422 |
++ struct pci_dev *pdev = to_pci_dev(dev); |
423 |
++ int ret; |
424 |
++ |
425 |
++ pci_restore_state(pdev); |
426 |
++ pci_set_power_state(pdev, PCI_D0); |
427 |
++ |
428 |
++ ret = pci_enable_device(pdev); |
429 |
++ if (ret) |
430 |
++ return ret; |
431 |
++ |
432 |
++ pci_set_master(pdev); |
433 |
++ |
434 |
++ return stmmac_resume(dev); |
435 |
++} |
436 |
++ |
437 |
++static SIMPLE_DEV_PM_OPS(stmmac_pm_ops, stmmac_pci_suspend, stmmac_pci_resume); |
438 |
+ |
439 |
+ /* synthetic ID, no official vendor */ |
440 |
+ #define PCI_VENDOR_ID_STMMAC 0x700 |
441 |
+diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/9000.c b/drivers/net/wireless/intel/iwlwifi/cfg/9000.c |
442 |
+index 73da5e63a609..2c80c722feca 100644 |
443 |
+--- a/drivers/net/wireless/intel/iwlwifi/cfg/9000.c |
444 |
++++ b/drivers/net/wireless/intel/iwlwifi/cfg/9000.c |
445 |
+@@ -177,6 +177,17 @@ const struct iwl_cfg iwl9260_2ac_cfg = { |
446 |
+ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, |
447 |
+ }; |
448 |
+ |
449 |
++const struct iwl_cfg iwl9260_killer_2ac_cfg = { |
450 |
++ .name = "Killer (R) Wireless-AC 1550 Wireless Network Adapter (9260NGW)", |
451 |
++ .fw_name_pre = IWL9260A_FW_PRE, |
452 |
++ .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE, |
453 |
++ IWL_DEVICE_9000, |
454 |
++ .ht_params = &iwl9000_ht_params, |
455 |
++ .nvm_ver = IWL9000_NVM_VERSION, |
456 |
++ .nvm_calib_ver = IWL9000_TX_POWER_VERSION, |
457 |
++ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, |
458 |
++}; |
459 |
++ |
460 |
+ const struct iwl_cfg iwl9270_2ac_cfg = { |
461 |
+ .name = "Intel(R) Dual Band Wireless AC 9270", |
462 |
+ .fw_name_pre = IWL9260A_FW_PRE, |
463 |
+@@ -266,6 +277,34 @@ const struct iwl_cfg iwl9560_2ac_cfg_soc = { |
464 |
+ .soc_latency = 5000, |
465 |
+ }; |
466 |
+ |
467 |
++const struct iwl_cfg iwl9560_killer_2ac_cfg_soc = { |
468 |
++ .name = "Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW)", |
469 |
++ .fw_name_pre = IWL9000A_FW_PRE, |
470 |
++ .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE, |
471 |
++ .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, |
472 |
++ IWL_DEVICE_9000, |
473 |
++ .ht_params = &iwl9000_ht_params, |
474 |
++ .nvm_ver = IWL9000_NVM_VERSION, |
475 |
++ .nvm_calib_ver = IWL9000_TX_POWER_VERSION, |
476 |
++ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, |
477 |
++ .integrated = true, |
478 |
++ .soc_latency = 5000, |
479 |
++}; |
480 |
++ |
481 |
++const struct iwl_cfg iwl9560_killer_s_2ac_cfg_soc = { |
482 |
++ .name = "Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW)", |
483 |
++ .fw_name_pre = IWL9000A_FW_PRE, |
484 |
++ .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE, |
485 |
++ .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, |
486 |
++ IWL_DEVICE_9000, |
487 |
++ .ht_params = &iwl9000_ht_params, |
488 |
++ .nvm_ver = IWL9000_NVM_VERSION, |
489 |
++ .nvm_calib_ver = IWL9000_TX_POWER_VERSION, |
490 |
++ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, |
491 |
++ .integrated = true, |
492 |
++ .soc_latency = 5000, |
493 |
++}; |
494 |
++ |
495 |
+ const struct iwl_cfg iwl9460_2ac_cfg_shared_clk = { |
496 |
+ .name = "Intel(R) Dual Band Wireless AC 9460", |
497 |
+ .fw_name_pre = IWL9000A_FW_PRE, |
498 |
+@@ -326,6 +365,36 @@ const struct iwl_cfg iwl9560_2ac_cfg_shared_clk = { |
499 |
+ .extra_phy_cfg_flags = FW_PHY_CFG_SHARED_CLK |
500 |
+ }; |
501 |
+ |
502 |
++const struct iwl_cfg iwl9560_killer_2ac_cfg_shared_clk = { |
503 |
++ .name = "Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW)", |
504 |
++ .fw_name_pre = IWL9000A_FW_PRE, |
505 |
++ .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE, |
506 |
++ .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, |
507 |
++ IWL_DEVICE_9000, |
508 |
++ .ht_params = &iwl9000_ht_params, |
509 |
++ .nvm_ver = IWL9000_NVM_VERSION, |
510 |
++ .nvm_calib_ver = IWL9000_TX_POWER_VERSION, |
511 |
++ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, |
512 |
++ .integrated = true, |
513 |
++ .soc_latency = 5000, |
514 |
++ .extra_phy_cfg_flags = FW_PHY_CFG_SHARED_CLK |
515 |
++}; |
516 |
++ |
517 |
++const struct iwl_cfg iwl9560_killer_s_2ac_cfg_shared_clk = { |
518 |
++ .name = "Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW)", |
519 |
++ .fw_name_pre = IWL9000A_FW_PRE, |
520 |
++ .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE, |
521 |
++ .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, |
522 |
++ IWL_DEVICE_9000, |
523 |
++ .ht_params = &iwl9000_ht_params, |
524 |
++ .nvm_ver = IWL9000_NVM_VERSION, |
525 |
++ .nvm_calib_ver = IWL9000_TX_POWER_VERSION, |
526 |
++ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, |
527 |
++ .integrated = true, |
528 |
++ .soc_latency = 5000, |
529 |
++ .extra_phy_cfg_flags = FW_PHY_CFG_SHARED_CLK |
530 |
++}; |
531 |
++ |
532 |
+ MODULE_FIRMWARE(IWL9000A_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX)); |
533 |
+ MODULE_FIRMWARE(IWL9000B_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX)); |
534 |
+ MODULE_FIRMWARE(IWL9000RFB_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX)); |
535 |
+diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h |
536 |
+index 85fe1a928adc..70f3c327eb4a 100644 |
537 |
+--- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h |
538 |
++++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h |
539 |
+@@ -470,6 +470,7 @@ extern const struct iwl_cfg iwl8265_2ac_sdio_cfg; |
540 |
+ extern const struct iwl_cfg iwl4165_2ac_sdio_cfg; |
541 |
+ extern const struct iwl_cfg iwl9160_2ac_cfg; |
542 |
+ extern const struct iwl_cfg iwl9260_2ac_cfg; |
543 |
++extern const struct iwl_cfg iwl9260_killer_2ac_cfg; |
544 |
+ extern const struct iwl_cfg iwl9270_2ac_cfg; |
545 |
+ extern const struct iwl_cfg iwl9460_2ac_cfg; |
546 |
+ extern const struct iwl_cfg iwl9560_2ac_cfg; |
547 |
+@@ -477,10 +478,14 @@ extern const struct iwl_cfg iwl9460_2ac_cfg_soc; |
548 |
+ extern const struct iwl_cfg iwl9461_2ac_cfg_soc; |
549 |
+ extern const struct iwl_cfg iwl9462_2ac_cfg_soc; |
550 |
+ extern const struct iwl_cfg iwl9560_2ac_cfg_soc; |
551 |
++extern const struct iwl_cfg iwl9560_killer_2ac_cfg_soc; |
552 |
++extern const struct iwl_cfg iwl9560_killer_s_2ac_cfg_soc; |
553 |
+ extern const struct iwl_cfg iwl9460_2ac_cfg_shared_clk; |
554 |
+ extern const struct iwl_cfg iwl9461_2ac_cfg_shared_clk; |
555 |
+ extern const struct iwl_cfg iwl9462_2ac_cfg_shared_clk; |
556 |
+ extern const struct iwl_cfg iwl9560_2ac_cfg_shared_clk; |
557 |
++extern const struct iwl_cfg iwl9560_killer_2ac_cfg_shared_clk; |
558 |
++extern const struct iwl_cfg iwl9560_killer_s_2ac_cfg_shared_clk; |
559 |
+ extern const struct iwl_cfg iwla000_2ac_cfg_hr; |
560 |
+ extern const struct iwl_cfg iwla000_2ac_cfg_hr_cdb; |
561 |
+ extern const struct iwl_cfg iwla000_2ac_cfg_jf; |
562 |
+diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c |
563 |
+index 9a8605abb00a..4cbc6cb8bf89 100644 |
564 |
+--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c |
565 |
++++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c |
566 |
+@@ -543,6 +543,9 @@ static const struct pci_device_id iwl_hw_card_ids[] = { |
567 |
+ {IWL_PCI_DEVICE(0x2526, 0x1210, iwl9260_2ac_cfg)}, |
568 |
+ {IWL_PCI_DEVICE(0x2526, 0x1410, iwl9270_2ac_cfg)}, |
569 |
+ {IWL_PCI_DEVICE(0x2526, 0x1420, iwl9460_2ac_cfg_soc)}, |
570 |
++ {IWL_PCI_DEVICE(0x2526, 0x1550, iwl9260_killer_2ac_cfg)}, |
571 |
++ {IWL_PCI_DEVICE(0x2526, 0x1551, iwl9560_killer_s_2ac_cfg_soc)}, |
572 |
++ {IWL_PCI_DEVICE(0x2526, 0x1552, iwl9560_killer_2ac_cfg_soc)}, |
573 |
+ {IWL_PCI_DEVICE(0x2526, 0x1610, iwl9270_2ac_cfg)}, |
574 |
+ {IWL_PCI_DEVICE(0x2526, 0x2030, iwl9560_2ac_cfg_soc)}, |
575 |
+ {IWL_PCI_DEVICE(0x2526, 0x2034, iwl9560_2ac_cfg_soc)}, |
576 |
+@@ -552,6 +555,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = { |
577 |
+ {IWL_PCI_DEVICE(0x2526, 0x40A4, iwl9460_2ac_cfg)}, |
578 |
+ {IWL_PCI_DEVICE(0x2526, 0x4234, iwl9560_2ac_cfg_soc)}, |
579 |
+ {IWL_PCI_DEVICE(0x2526, 0x42A4, iwl9462_2ac_cfg_soc)}, |
580 |
++ {IWL_PCI_DEVICE(0x2526, 0x8014, iwl9260_2ac_cfg)}, |
581 |
+ {IWL_PCI_DEVICE(0x2526, 0xA014, iwl9260_2ac_cfg)}, |
582 |
+ {IWL_PCI_DEVICE(0x271B, 0x0010, iwl9160_2ac_cfg)}, |
583 |
+ {IWL_PCI_DEVICE(0x271B, 0x0014, iwl9160_2ac_cfg)}, |
584 |
+@@ -576,6 +580,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { |
585 |
+ {IWL_PCI_DEVICE(0x2720, 0x1010, iwl9260_2ac_cfg)}, |
586 |
+ {IWL_PCI_DEVICE(0x2720, 0x1030, iwl9560_2ac_cfg_soc)}, |
587 |
+ {IWL_PCI_DEVICE(0x2720, 0x1210, iwl9260_2ac_cfg)}, |
588 |
++ {IWL_PCI_DEVICE(0x2720, 0x1551, iwl9560_killer_s_2ac_cfg_soc)}, |
589 |
++ {IWL_PCI_DEVICE(0x2720, 0x1552, iwl9560_killer_2ac_cfg_soc)}, |
590 |
+ {IWL_PCI_DEVICE(0x2720, 0x2030, iwl9560_2ac_cfg_soc)}, |
591 |
+ {IWL_PCI_DEVICE(0x2720, 0x2034, iwl9560_2ac_cfg_soc)}, |
592 |
+ {IWL_PCI_DEVICE(0x2720, 0x4030, iwl9560_2ac_cfg)}, |
593 |
+@@ -602,6 +608,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { |
594 |
+ {IWL_PCI_DEVICE(0x30DC, 0x1010, iwl9260_2ac_cfg)}, |
595 |
+ {IWL_PCI_DEVICE(0x30DC, 0x1030, iwl9560_2ac_cfg_soc)}, |
596 |
+ {IWL_PCI_DEVICE(0x30DC, 0x1210, iwl9260_2ac_cfg)}, |
597 |
++ {IWL_PCI_DEVICE(0x30DC, 0x1551, iwl9560_killer_s_2ac_cfg_soc)}, |
598 |
++ {IWL_PCI_DEVICE(0x30DC, 0x1552, iwl9560_killer_2ac_cfg_soc)}, |
599 |
+ {IWL_PCI_DEVICE(0x30DC, 0x2030, iwl9560_2ac_cfg_soc)}, |
600 |
+ {IWL_PCI_DEVICE(0x30DC, 0x2034, iwl9560_2ac_cfg_soc)}, |
601 |
+ {IWL_PCI_DEVICE(0x30DC, 0x4030, iwl9560_2ac_cfg_soc)}, |
602 |
+@@ -628,6 +636,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { |
603 |
+ {IWL_PCI_DEVICE(0x31DC, 0x1010, iwl9260_2ac_cfg)}, |
604 |
+ {IWL_PCI_DEVICE(0x31DC, 0x1030, iwl9560_2ac_cfg_shared_clk)}, |
605 |
+ {IWL_PCI_DEVICE(0x31DC, 0x1210, iwl9260_2ac_cfg)}, |
606 |
++ {IWL_PCI_DEVICE(0x31DC, 0x1551, iwl9560_killer_s_2ac_cfg_shared_clk)}, |
607 |
++ {IWL_PCI_DEVICE(0x31DC, 0x1552, iwl9560_killer_2ac_cfg_shared_clk)}, |
608 |
+ {IWL_PCI_DEVICE(0x31DC, 0x2030, iwl9560_2ac_cfg_shared_clk)}, |
609 |
+ {IWL_PCI_DEVICE(0x31DC, 0x2034, iwl9560_2ac_cfg_shared_clk)}, |
610 |
+ {IWL_PCI_DEVICE(0x31DC, 0x4030, iwl9560_2ac_cfg_shared_clk)}, |
611 |
+@@ -654,6 +664,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { |
612 |
+ {IWL_PCI_DEVICE(0x34F0, 0x1010, iwl9260_2ac_cfg)}, |
613 |
+ {IWL_PCI_DEVICE(0x34F0, 0x1030, iwl9560_2ac_cfg_soc)}, |
614 |
+ {IWL_PCI_DEVICE(0x34F0, 0x1210, iwl9260_2ac_cfg)}, |
615 |
++ {IWL_PCI_DEVICE(0x34F0, 0x1551, iwl9560_killer_s_2ac_cfg_soc)}, |
616 |
++ {IWL_PCI_DEVICE(0x34F0, 0x1552, iwl9560_killer_2ac_cfg_soc)}, |
617 |
+ {IWL_PCI_DEVICE(0x34F0, 0x2030, iwl9560_2ac_cfg_soc)}, |
618 |
+ {IWL_PCI_DEVICE(0x34F0, 0x2034, iwl9560_2ac_cfg_soc)}, |
619 |
+ {IWL_PCI_DEVICE(0x34F0, 0x4030, iwl9560_2ac_cfg_soc)}, |
620 |
+@@ -680,6 +692,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { |
621 |
+ {IWL_PCI_DEVICE(0x3DF0, 0x1010, iwl9260_2ac_cfg)}, |
622 |
+ {IWL_PCI_DEVICE(0x3DF0, 0x1030, iwl9560_2ac_cfg_soc)}, |
623 |
+ {IWL_PCI_DEVICE(0x3DF0, 0x1210, iwl9260_2ac_cfg)}, |
624 |
++ {IWL_PCI_DEVICE(0x3DF0, 0x1551, iwl9560_killer_s_2ac_cfg_soc)}, |
625 |
++ {IWL_PCI_DEVICE(0x3DF0, 0x1552, iwl9560_killer_2ac_cfg_soc)}, |
626 |
+ {IWL_PCI_DEVICE(0x3DF0, 0x2030, iwl9560_2ac_cfg_soc)}, |
627 |
+ {IWL_PCI_DEVICE(0x3DF0, 0x2034, iwl9560_2ac_cfg_soc)}, |
628 |
+ {IWL_PCI_DEVICE(0x3DF0, 0x4030, iwl9560_2ac_cfg_soc)}, |
629 |
+@@ -706,6 +720,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { |
630 |
+ {IWL_PCI_DEVICE(0x43F0, 0x1010, iwl9260_2ac_cfg)}, |
631 |
+ {IWL_PCI_DEVICE(0x43F0, 0x1030, iwl9560_2ac_cfg_soc)}, |
632 |
+ {IWL_PCI_DEVICE(0x43F0, 0x1210, iwl9260_2ac_cfg)}, |
633 |
++ {IWL_PCI_DEVICE(0x43F0, 0x1551, iwl9560_killer_s_2ac_cfg_soc)}, |
634 |
++ {IWL_PCI_DEVICE(0x43F0, 0x1552, iwl9560_killer_2ac_cfg_soc)}, |
635 |
+ {IWL_PCI_DEVICE(0x43F0, 0x2030, iwl9560_2ac_cfg_soc)}, |
636 |
+ {IWL_PCI_DEVICE(0x43F0, 0x2034, iwl9560_2ac_cfg_soc)}, |
637 |
+ {IWL_PCI_DEVICE(0x43F0, 0x4030, iwl9560_2ac_cfg_soc)}, |
638 |
+@@ -741,6 +757,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { |
639 |
+ {IWL_PCI_DEVICE(0x9DF0, 0x1010, iwl9260_2ac_cfg)}, |
640 |
+ {IWL_PCI_DEVICE(0x9DF0, 0x1030, iwl9560_2ac_cfg_soc)}, |
641 |
+ {IWL_PCI_DEVICE(0x9DF0, 0x1210, iwl9260_2ac_cfg)}, |
642 |
++ {IWL_PCI_DEVICE(0x9DF0, 0x1551, iwl9560_killer_s_2ac_cfg_soc)}, |
643 |
++ {IWL_PCI_DEVICE(0x9DF0, 0x1552, iwl9560_killer_2ac_cfg_soc)}, |
644 |
+ {IWL_PCI_DEVICE(0x9DF0, 0x2010, iwl9460_2ac_cfg_soc)}, |
645 |
+ {IWL_PCI_DEVICE(0x9DF0, 0x2030, iwl9560_2ac_cfg_soc)}, |
646 |
+ {IWL_PCI_DEVICE(0x9DF0, 0x2034, iwl9560_2ac_cfg_soc)}, |
647 |
+@@ -769,6 +787,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { |
648 |
+ {IWL_PCI_DEVICE(0xA0F0, 0x1010, iwl9260_2ac_cfg)}, |
649 |
+ {IWL_PCI_DEVICE(0xA0F0, 0x1030, iwl9560_2ac_cfg_soc)}, |
650 |
+ {IWL_PCI_DEVICE(0xA0F0, 0x1210, iwl9260_2ac_cfg)}, |
651 |
++ {IWL_PCI_DEVICE(0xA0F0, 0x1551, iwl9560_killer_s_2ac_cfg_soc)}, |
652 |
++ {IWL_PCI_DEVICE(0xA0F0, 0x1552, iwl9560_killer_2ac_cfg_soc)}, |
653 |
+ {IWL_PCI_DEVICE(0xA0F0, 0x2030, iwl9560_2ac_cfg_soc)}, |
654 |
+ {IWL_PCI_DEVICE(0xA0F0, 0x2034, iwl9560_2ac_cfg_soc)}, |
655 |
+ {IWL_PCI_DEVICE(0xA0F0, 0x4030, iwl9560_2ac_cfg_soc)}, |
656 |
+@@ -795,6 +815,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { |
657 |
+ {IWL_PCI_DEVICE(0xA370, 0x1010, iwl9260_2ac_cfg)}, |
658 |
+ {IWL_PCI_DEVICE(0xA370, 0x1030, iwl9560_2ac_cfg_soc)}, |
659 |
+ {IWL_PCI_DEVICE(0xA370, 0x1210, iwl9260_2ac_cfg)}, |
660 |
++ {IWL_PCI_DEVICE(0xA370, 0x1551, iwl9560_killer_s_2ac_cfg_soc)}, |
661 |
++ {IWL_PCI_DEVICE(0xA370, 0x1552, iwl9560_killer_2ac_cfg_soc)}, |
662 |
+ {IWL_PCI_DEVICE(0xA370, 0x2030, iwl9560_2ac_cfg_soc)}, |
663 |
+ {IWL_PCI_DEVICE(0xA370, 0x2034, iwl9560_2ac_cfg_soc)}, |
664 |
+ {IWL_PCI_DEVICE(0xA370, 0x4030, iwl9560_2ac_cfg_soc)}, |
665 |
+diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c |
666 |
+index 4d49fb8f2bbc..3a406b40f150 100644 |
667 |
+--- a/drivers/scsi/sg.c |
668 |
++++ b/drivers/scsi/sg.c |
669 |
+@@ -2186,6 +2186,7 @@ sg_add_sfp(Sg_device * sdp) |
670 |
+ write_lock_irqsave(&sdp->sfd_lock, iflags); |
671 |
+ if (atomic_read(&sdp->detaching)) { |
672 |
+ write_unlock_irqrestore(&sdp->sfd_lock, iflags); |
673 |
++ kfree(sfp); |
674 |
+ return ERR_PTR(-ENODEV); |
675 |
+ } |
676 |
+ list_add_tail(&sfp->sfd_siblings, &sdp->sfds); |
677 |
+diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c |
678 |
+index f0b3a0b9d42f..36c9fbf70d44 100644 |
679 |
+--- a/drivers/virtio/virtio_balloon.c |
680 |
++++ b/drivers/virtio/virtio_balloon.c |
681 |
+@@ -490,7 +490,9 @@ static int virtballoon_migratepage(struct balloon_dev_info *vb_dev_info, |
682 |
+ tell_host(vb, vb->inflate_vq); |
683 |
+ |
684 |
+ /* balloon's page migration 2nd step -- deflate "page" */ |
685 |
++ spin_lock_irqsave(&vb_dev_info->pages_lock, flags); |
686 |
+ balloon_page_delete(page); |
687 |
++ spin_unlock_irqrestore(&vb_dev_info->pages_lock, flags); |
688 |
+ vb->num_pfns = VIRTIO_BALLOON_PAGES_PER_PAGE; |
689 |
+ set_page_pfns(vb, vb->pfns, page); |
690 |
+ tell_host(vb, vb->deflate_vq); |
691 |
+diff --git a/fs/squashfs/block.c b/fs/squashfs/block.c |
692 |
+index 2751476e6b6e..f098b9f1c396 100644 |
693 |
+--- a/fs/squashfs/block.c |
694 |
++++ b/fs/squashfs/block.c |
695 |
+@@ -167,6 +167,8 @@ int squashfs_read_data(struct super_block *sb, u64 index, int length, |
696 |
+ } |
697 |
+ |
698 |
+ if (compressed) { |
699 |
++ if (!msblk->stream) |
700 |
++ goto read_failure; |
701 |
+ length = squashfs_decompress(msblk, bh, b, offset, length, |
702 |
+ output); |
703 |
+ if (length < 0) |
704 |
+diff --git a/fs/squashfs/fragment.c b/fs/squashfs/fragment.c |
705 |
+index 86ad9a4b8c36..0681feab4a84 100644 |
706 |
+--- a/fs/squashfs/fragment.c |
707 |
++++ b/fs/squashfs/fragment.c |
708 |
+@@ -49,11 +49,16 @@ int squashfs_frag_lookup(struct super_block *sb, unsigned int fragment, |
709 |
+ u64 *fragment_block) |
710 |
+ { |
711 |
+ struct squashfs_sb_info *msblk = sb->s_fs_info; |
712 |
+- int block = SQUASHFS_FRAGMENT_INDEX(fragment); |
713 |
+- int offset = SQUASHFS_FRAGMENT_INDEX_OFFSET(fragment); |
714 |
+- u64 start_block = le64_to_cpu(msblk->fragment_index[block]); |
715 |
++ int block, offset, size; |
716 |
+ struct squashfs_fragment_entry fragment_entry; |
717 |
+- int size; |
718 |
++ u64 start_block; |
719 |
++ |
720 |
++ if (fragment >= msblk->fragments) |
721 |
++ return -EIO; |
722 |
++ block = SQUASHFS_FRAGMENT_INDEX(fragment); |
723 |
++ offset = SQUASHFS_FRAGMENT_INDEX_OFFSET(fragment); |
724 |
++ |
725 |
++ start_block = le64_to_cpu(msblk->fragment_index[block]); |
726 |
+ |
727 |
+ size = squashfs_read_metadata(sb, &fragment_entry, &start_block, |
728 |
+ &offset, sizeof(fragment_entry)); |
729 |
+diff --git a/fs/squashfs/squashfs_fs_sb.h b/fs/squashfs/squashfs_fs_sb.h |
730 |
+index 1da565cb50c3..ef69c31947bf 100644 |
731 |
+--- a/fs/squashfs/squashfs_fs_sb.h |
732 |
++++ b/fs/squashfs/squashfs_fs_sb.h |
733 |
+@@ -75,6 +75,7 @@ struct squashfs_sb_info { |
734 |
+ unsigned short block_log; |
735 |
+ long long bytes_used; |
736 |
+ unsigned int inodes; |
737 |
++ unsigned int fragments; |
738 |
+ int xattr_ids; |
739 |
+ }; |
740 |
+ #endif |
741 |
+diff --git a/fs/squashfs/super.c b/fs/squashfs/super.c |
742 |
+index cf01e15a7b16..1516bb779b8d 100644 |
743 |
+--- a/fs/squashfs/super.c |
744 |
++++ b/fs/squashfs/super.c |
745 |
+@@ -175,6 +175,7 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent) |
746 |
+ msblk->inode_table = le64_to_cpu(sblk->inode_table_start); |
747 |
+ msblk->directory_table = le64_to_cpu(sblk->directory_table_start); |
748 |
+ msblk->inodes = le32_to_cpu(sblk->inodes); |
749 |
++ msblk->fragments = le32_to_cpu(sblk->fragments); |
750 |
+ flags = le16_to_cpu(sblk->flags); |
751 |
+ |
752 |
+ TRACE("Found valid superblock on %pg\n", sb->s_bdev); |
753 |
+@@ -185,7 +186,7 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent) |
754 |
+ TRACE("Filesystem size %lld bytes\n", msblk->bytes_used); |
755 |
+ TRACE("Block size %d\n", msblk->block_size); |
756 |
+ TRACE("Number of inodes %d\n", msblk->inodes); |
757 |
+- TRACE("Number of fragments %d\n", le32_to_cpu(sblk->fragments)); |
758 |
++ TRACE("Number of fragments %d\n", msblk->fragments); |
759 |
+ TRACE("Number of ids %d\n", le16_to_cpu(sblk->no_ids)); |
760 |
+ TRACE("sblk->inode_table_start %llx\n", msblk->inode_table); |
761 |
+ TRACE("sblk->directory_table_start %llx\n", msblk->directory_table); |
762 |
+@@ -272,7 +273,7 @@ allocate_id_index_table: |
763 |
+ sb->s_export_op = &squashfs_export_ops; |
764 |
+ |
765 |
+ handle_fragments: |
766 |
+- fragments = le32_to_cpu(sblk->fragments); |
767 |
++ fragments = msblk->fragments; |
768 |
+ if (fragments == 0) |
769 |
+ goto check_directory_table; |
770 |
+ |
771 |
+diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c |
772 |
+index f6ed92524a03..3eda623e4cb4 100644 |
773 |
+--- a/fs/userfaultfd.c |
774 |
++++ b/fs/userfaultfd.c |
775 |
+@@ -628,8 +628,10 @@ static void userfaultfd_event_wait_completion(struct userfaultfd_ctx *ctx, |
776 |
+ /* the various vma->vm_userfaultfd_ctx still points to it */ |
777 |
+ down_write(&mm->mmap_sem); |
778 |
+ for (vma = mm->mmap; vma; vma = vma->vm_next) |
779 |
+- if (vma->vm_userfaultfd_ctx.ctx == release_new_ctx) |
780 |
++ if (vma->vm_userfaultfd_ctx.ctx == release_new_ctx) { |
781 |
+ vma->vm_userfaultfd_ctx = NULL_VM_UFFD_CTX; |
782 |
++ vma->vm_flags &= ~(VM_UFFD_WP | VM_UFFD_MISSING); |
783 |
++ } |
784 |
+ up_write(&mm->mmap_sem); |
785 |
+ |
786 |
+ userfaultfd_ctx_put(release_new_ctx); |
787 |
+diff --git a/kernel/auditsc.c b/kernel/auditsc.c |
788 |
+index 677053a2fb57..76d789d6cea0 100644 |
789 |
+--- a/kernel/auditsc.c |
790 |
++++ b/kernel/auditsc.c |
791 |
+@@ -1274,8 +1274,12 @@ static void show_special(struct audit_context *context, int *call_panic) |
792 |
+ break; |
793 |
+ case AUDIT_KERN_MODULE: |
794 |
+ audit_log_format(ab, "name="); |
795 |
+- audit_log_untrustedstring(ab, context->module.name); |
796 |
+- kfree(context->module.name); |
797 |
++ if (context->module.name) { |
798 |
++ audit_log_untrustedstring(ab, context->module.name); |
799 |
++ kfree(context->module.name); |
800 |
++ } else |
801 |
++ audit_log_format(ab, "(null)"); |
802 |
++ |
803 |
+ break; |
804 |
+ } |
805 |
+ audit_log_end(ab); |
806 |
+@@ -2387,8 +2391,9 @@ void __audit_log_kern_module(char *name) |
807 |
+ { |
808 |
+ struct audit_context *context = current->audit_context; |
809 |
+ |
810 |
+- context->module.name = kmalloc(strlen(name) + 1, GFP_KERNEL); |
811 |
+- strcpy(context->module.name, name); |
812 |
++ context->module.name = kstrdup(name, GFP_KERNEL); |
813 |
++ if (!context->module.name) |
814 |
++ audit_log_lost("out of memory in __audit_log_kern_module"); |
815 |
+ context->type = AUDIT_KERN_MODULE; |
816 |
+ } |
817 |
+ |
818 |
+diff --git a/net/dsa/slave.c b/net/dsa/slave.c |
819 |
+index 865e29e62bad..242e74b9d454 100644 |
820 |
+--- a/net/dsa/slave.c |
821 |
++++ b/net/dsa/slave.c |
822 |
+@@ -1219,6 +1219,9 @@ int dsa_slave_suspend(struct net_device *slave_dev) |
823 |
+ { |
824 |
+ struct dsa_slave_priv *p = netdev_priv(slave_dev); |
825 |
+ |
826 |
++ if (!netif_running(slave_dev)) |
827 |
++ return 0; |
828 |
++ |
829 |
+ netif_device_detach(slave_dev); |
830 |
+ |
831 |
+ if (p->phy) { |
832 |
+@@ -1236,6 +1239,9 @@ int dsa_slave_resume(struct net_device *slave_dev) |
833 |
+ { |
834 |
+ struct dsa_slave_priv *p = netdev_priv(slave_dev); |
835 |
+ |
836 |
++ if (!netif_running(slave_dev)) |
837 |
++ return 0; |
838 |
++ |
839 |
+ netif_device_attach(slave_dev); |
840 |
+ |
841 |
+ if (p->phy) { |
842 |
+diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c |
843 |
+index e691705f0a85..ba4454ecdf0f 100644 |
844 |
+--- a/net/ipv4/inet_fragment.c |
845 |
++++ b/net/ipv4/inet_fragment.c |
846 |
+@@ -356,11 +356,6 @@ static struct inet_frag_queue *inet_frag_alloc(struct netns_frags *nf, |
847 |
+ { |
848 |
+ struct inet_frag_queue *q; |
849 |
+ |
850 |
+- if (!nf->high_thresh || frag_mem_limit(nf) > nf->high_thresh) { |
851 |
+- inet_frag_schedule_worker(f); |
852 |
+- return NULL; |
853 |
+- } |
854 |
+- |
855 |
+ q = kmem_cache_zalloc(f->frags_cachep, GFP_ATOMIC); |
856 |
+ if (!q) |
857 |
+ return NULL; |
858 |
+@@ -397,6 +392,11 @@ struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, |
859 |
+ struct inet_frag_queue *q; |
860 |
+ int depth = 0; |
861 |
+ |
862 |
++ if (!nf->high_thresh || frag_mem_limit(nf) > nf->high_thresh) { |
863 |
++ inet_frag_schedule_worker(f); |
864 |
++ return NULL; |
865 |
++ } |
866 |
++ |
867 |
+ if (frag_mem_limit(nf) > nf->low_thresh) |
868 |
+ inet_frag_schedule_worker(f); |
869 |
+ |
870 |
+diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c |
871 |
+index df8fe0503de0..4cb1befc3949 100644 |
872 |
+--- a/net/ipv4/ip_fragment.c |
873 |
++++ b/net/ipv4/ip_fragment.c |
874 |
+@@ -447,11 +447,16 @@ found: |
875 |
+ int i = end - FRAG_CB(next)->offset; /* overlap is 'i' bytes */ |
876 |
+ |
877 |
+ if (i < next->len) { |
878 |
++ int delta = -next->truesize; |
879 |
++ |
880 |
+ /* Eat head of the next overlapped fragment |
881 |
+ * and leave the loop. The next ones cannot overlap. |
882 |
+ */ |
883 |
+ if (!pskb_pull(next, i)) |
884 |
+ goto err; |
885 |
++ delta += next->truesize; |
886 |
++ if (delta) |
887 |
++ add_frag_mem_limit(qp->q.net, delta); |
888 |
+ FRAG_CB(next)->offset += i; |
889 |
+ qp->q.meat -= i; |
890 |
+ if (next->ip_summed != CHECKSUM_UNNECESSARY) |
891 |
+diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c |
892 |
+index b2fcbf012056..68c9d1833b95 100644 |
893 |
+--- a/net/netlink/af_netlink.c |
894 |
++++ b/net/netlink/af_netlink.c |
895 |
+@@ -63,6 +63,7 @@ |
896 |
+ #include <linux/hash.h> |
897 |
+ #include <linux/genetlink.h> |
898 |
+ #include <linux/net_namespace.h> |
899 |
++#include <linux/nospec.h> |
900 |
+ |
901 |
+ #include <net/net_namespace.h> |
902 |
+ #include <net/sock.h> |
903 |
+@@ -647,6 +648,7 @@ static int netlink_create(struct net *net, struct socket *sock, int protocol, |
904 |
+ |
905 |
+ if (protocol < 0 || protocol >= MAX_LINKS) |
906 |
+ return -EPROTONOSUPPORT; |
907 |
++ protocol = array_index_nospec(protocol, MAX_LINKS); |
908 |
+ |
909 |
+ netlink_lock_table(); |
910 |
+ #ifdef CONFIG_MODULES |
911 |
+diff --git a/net/rxrpc/call_accept.c b/net/rxrpc/call_accept.c |
912 |
+index 3028298ca561..62b1581d44a5 100644 |
913 |
+--- a/net/rxrpc/call_accept.c |
914 |
++++ b/net/rxrpc/call_accept.c |
915 |
+@@ -115,9 +115,9 @@ static int rxrpc_service_prealloc_one(struct rxrpc_sock *rx, |
916 |
+ while (*pp) { |
917 |
+ parent = *pp; |
918 |
+ xcall = rb_entry(parent, struct rxrpc_call, sock_node); |
919 |
+- if (user_call_ID < call->user_call_ID) |
920 |
++ if (user_call_ID < xcall->user_call_ID) |
921 |
+ pp = &(*pp)->rb_left; |
922 |
+- else if (user_call_ID > call->user_call_ID) |
923 |
++ else if (user_call_ID > xcall->user_call_ID) |
924 |
+ pp = &(*pp)->rb_right; |
925 |
+ else |
926 |
+ goto id_in_use; |
927 |
+diff --git a/net/socket.c b/net/socket.c |
928 |
+index 8b2bef6cfe42..d27922639a20 100644 |
929 |
+--- a/net/socket.c |
930 |
++++ b/net/socket.c |
931 |
+@@ -89,6 +89,7 @@ |
932 |
+ #include <linux/magic.h> |
933 |
+ #include <linux/slab.h> |
934 |
+ #include <linux/xattr.h> |
935 |
++#include <linux/nospec.h> |
936 |
+ |
937 |
+ #include <linux/uaccess.h> |
938 |
+ #include <asm/unistd.h> |
939 |
+@@ -2443,6 +2444,7 @@ SYSCALL_DEFINE2(socketcall, int, call, unsigned long __user *, args) |
940 |
+ |
941 |
+ if (call < 1 || call > SYS_SENDMMSG) |
942 |
+ return -EINVAL; |
943 |
++ call = array_index_nospec(call, SYS_SENDMMSG + 1); |
944 |
+ |
945 |
+ len = nargs[call]; |
946 |
+ if (len > sizeof(a)) |