1 |
commit: 33be69262c3b8c3d5fc660ec3b651347f602e575 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 23 12:43:43 2018 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 23 12:43:43 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=33be6926 |
7 |
|
8 |
proj/linux-patches: Linux patch 4.14.83 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1082_linux-4.14.83.patch | 667 +++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 671 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index b8ff7e8..37903b0 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -371,6 +371,10 @@ Patch: 1081-4.14.82.patch |
21 |
From: http://www.kernel.org |
22 |
Desc: Linux 4.14.82 |
23 |
|
24 |
+Patch: 1082-4.14.83.patch |
25 |
+From: http://www.kernel.org |
26 |
+Desc: Linux 4.14.83 |
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/1082_linux-4.14.83.patch b/1082_linux-4.14.83.patch |
33 |
new file mode 100644 |
34 |
index 0000000..466e5dd |
35 |
--- /dev/null |
36 |
+++ b/1082_linux-4.14.83.patch |
37 |
@@ -0,0 +1,667 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index cac5323bc95d..0f42814095a4 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 = 82 |
47 |
++SUBLEVEL = 83 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = Petit Gorille |
50 |
+ |
51 |
+diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi |
52 |
+index f1d1a9772153..0aceb3736e5c 100644 |
53 |
+--- a/arch/arm/boot/dts/r8a7791.dtsi |
54 |
++++ b/arch/arm/boot/dts/r8a7791.dtsi |
55 |
+@@ -91,7 +91,7 @@ |
56 |
+ |
57 |
+ trips { |
58 |
+ cpu-crit { |
59 |
+- temperature = <115000>; |
60 |
++ temperature = <95000>; |
61 |
+ hysteresis = <0>; |
62 |
+ type = "critical"; |
63 |
+ }; |
64 |
+diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi |
65 |
+index 497716b6fbe2..fd12564aabc3 100644 |
66 |
+--- a/arch/arm/boot/dts/r8a7793.dtsi |
67 |
++++ b/arch/arm/boot/dts/r8a7793.dtsi |
68 |
+@@ -88,7 +88,7 @@ |
69 |
+ |
70 |
+ trips { |
71 |
+ cpu-crit { |
72 |
+- temperature = <115000>; |
73 |
++ temperature = <95000>; |
74 |
+ hysteresis = <0>; |
75 |
+ type = "critical"; |
76 |
+ }; |
77 |
+diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c |
78 |
+index aa6e7f75bccc..e92aedd93806 100644 |
79 |
+--- a/arch/x86/kernel/cpu/bugs.c |
80 |
++++ b/arch/x86/kernel/cpu/bugs.c |
81 |
+@@ -34,10 +34,12 @@ static void __init spectre_v2_select_mitigation(void); |
82 |
+ static void __init ssb_select_mitigation(void); |
83 |
+ static void __init l1tf_select_mitigation(void); |
84 |
+ |
85 |
+-/* The base value of the SPEC_CTRL MSR that always has to be preserved. */ |
86 |
+-u64 x86_spec_ctrl_base; |
87 |
++/* |
88 |
++ * Our boot-time value of the SPEC_CTRL MSR. We read it once so that any |
89 |
++ * writes to SPEC_CTRL contain whatever reserved bits have been set. |
90 |
++ */ |
91 |
++u64 __ro_after_init x86_spec_ctrl_base; |
92 |
+ EXPORT_SYMBOL_GPL(x86_spec_ctrl_base); |
93 |
+-static DEFINE_MUTEX(spec_ctrl_mutex); |
94 |
+ |
95 |
+ /* |
96 |
+ * The vendor and possibly platform specific bits which can be modified in |
97 |
+@@ -321,46 +323,6 @@ static enum spectre_v2_mitigation_cmd __init spectre_v2_parse_cmdline(void) |
98 |
+ return cmd; |
99 |
+ } |
100 |
+ |
101 |
+-static bool stibp_needed(void) |
102 |
+-{ |
103 |
+- if (spectre_v2_enabled == SPECTRE_V2_NONE) |
104 |
+- return false; |
105 |
+- |
106 |
+- if (!boot_cpu_has(X86_FEATURE_STIBP)) |
107 |
+- return false; |
108 |
+- |
109 |
+- return true; |
110 |
+-} |
111 |
+- |
112 |
+-static void update_stibp_msr(void *info) |
113 |
+-{ |
114 |
+- wrmsrl(MSR_IA32_SPEC_CTRL, x86_spec_ctrl_base); |
115 |
+-} |
116 |
+- |
117 |
+-void arch_smt_update(void) |
118 |
+-{ |
119 |
+- u64 mask; |
120 |
+- |
121 |
+- if (!stibp_needed()) |
122 |
+- return; |
123 |
+- |
124 |
+- mutex_lock(&spec_ctrl_mutex); |
125 |
+- mask = x86_spec_ctrl_base; |
126 |
+- if (cpu_smt_control == CPU_SMT_ENABLED) |
127 |
+- mask |= SPEC_CTRL_STIBP; |
128 |
+- else |
129 |
+- mask &= ~SPEC_CTRL_STIBP; |
130 |
+- |
131 |
+- if (mask != x86_spec_ctrl_base) { |
132 |
+- pr_info("Spectre v2 cross-process SMT mitigation: %s STIBP\n", |
133 |
+- cpu_smt_control == CPU_SMT_ENABLED ? |
134 |
+- "Enabling" : "Disabling"); |
135 |
+- x86_spec_ctrl_base = mask; |
136 |
+- on_each_cpu(update_stibp_msr, NULL, 1); |
137 |
+- } |
138 |
+- mutex_unlock(&spec_ctrl_mutex); |
139 |
+-} |
140 |
+- |
141 |
+ static void __init spectre_v2_select_mitigation(void) |
142 |
+ { |
143 |
+ enum spectre_v2_mitigation_cmd cmd = spectre_v2_parse_cmdline(); |
144 |
+@@ -460,9 +422,6 @@ specv2_set_mode: |
145 |
+ setup_force_cpu_cap(X86_FEATURE_USE_IBRS_FW); |
146 |
+ pr_info("Enabling Restricted Speculation for firmware calls\n"); |
147 |
+ } |
148 |
+- |
149 |
+- /* Enable STIBP if appropriate */ |
150 |
+- arch_smt_update(); |
151 |
+ } |
152 |
+ |
153 |
+ #undef pr_fmt |
154 |
+@@ -855,8 +814,6 @@ static ssize_t l1tf_show_state(char *buf) |
155 |
+ static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr, |
156 |
+ char *buf, unsigned int bug) |
157 |
+ { |
158 |
+- int ret; |
159 |
+- |
160 |
+ if (!boot_cpu_has_bug(bug)) |
161 |
+ return sprintf(buf, "Not affected\n"); |
162 |
+ |
163 |
+@@ -871,12 +828,10 @@ static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr |
164 |
+ return sprintf(buf, "Mitigation: __user pointer sanitization\n"); |
165 |
+ |
166 |
+ case X86_BUG_SPECTRE_V2: |
167 |
+- ret = sprintf(buf, "%s%s%s%s%s\n", spectre_v2_strings[spectre_v2_enabled], |
168 |
++ return sprintf(buf, "%s%s%s%s\n", spectre_v2_strings[spectre_v2_enabled], |
169 |
+ boot_cpu_has(X86_FEATURE_USE_IBPB) ? ", IBPB" : "", |
170 |
+ boot_cpu_has(X86_FEATURE_USE_IBRS_FW) ? ", IBRS_FW" : "", |
171 |
+- (x86_spec_ctrl_base & SPEC_CTRL_STIBP) ? ", STIBP" : "", |
172 |
+ spectre_v2_module_string()); |
173 |
+- return ret; |
174 |
+ |
175 |
+ case X86_BUG_SPEC_STORE_BYPASS: |
176 |
+ return sprintf(buf, "%s\n", ssb_strings[ssb_mode]); |
177 |
+diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c |
178 |
+index 56cd6d365352..6f4c9913f8f5 100644 |
179 |
+--- a/drivers/net/dsa/microchip/ksz_common.c |
180 |
++++ b/drivers/net/dsa/microchip/ksz_common.c |
181 |
+@@ -1104,11 +1104,6 @@ static int ksz_switch_init(struct ksz_device *dev) |
182 |
+ { |
183 |
+ int i; |
184 |
+ |
185 |
+- mutex_init(&dev->reg_mutex); |
186 |
+- mutex_init(&dev->stats_mutex); |
187 |
+- mutex_init(&dev->alu_mutex); |
188 |
+- mutex_init(&dev->vlan_mutex); |
189 |
+- |
190 |
+ dev->ds->ops = &ksz_switch_ops; |
191 |
+ |
192 |
+ for (i = 0; i < ARRAY_SIZE(ksz_switch_chips); i++) { |
193 |
+@@ -1193,6 +1188,11 @@ int ksz_switch_register(struct ksz_device *dev) |
194 |
+ if (dev->pdata) |
195 |
+ dev->chip_id = dev->pdata->chip_id; |
196 |
+ |
197 |
++ mutex_init(&dev->reg_mutex); |
198 |
++ mutex_init(&dev->stats_mutex); |
199 |
++ mutex_init(&dev->alu_mutex); |
200 |
++ mutex_init(&dev->vlan_mutex); |
201 |
++ |
202 |
+ if (ksz_switch_detect(dev)) |
203 |
+ return -EINVAL; |
204 |
+ |
205 |
+diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c |
206 |
+index 6e7f9a470ea1..45462557e51c 100644 |
207 |
+--- a/drivers/net/ethernet/broadcom/bcmsysport.c |
208 |
++++ b/drivers/net/ethernet/broadcom/bcmsysport.c |
209 |
+@@ -1774,9 +1774,6 @@ static void bcm_sysport_netif_start(struct net_device *dev) |
210 |
+ intrl2_1_mask_clear(priv, 0xffffffff); |
211 |
+ else |
212 |
+ intrl2_0_mask_clear(priv, INTRL2_0_TDMA_MBDONE_MASK); |
213 |
+- |
214 |
+- /* Last call before we start the real business */ |
215 |
+- netif_tx_start_all_queues(dev); |
216 |
+ } |
217 |
+ |
218 |
+ static void rbuf_init(struct bcm_sysport_priv *priv) |
219 |
+@@ -1922,6 +1919,8 @@ static int bcm_sysport_open(struct net_device *dev) |
220 |
+ |
221 |
+ bcm_sysport_netif_start(dev); |
222 |
+ |
223 |
++ netif_tx_start_all_queues(dev); |
224 |
++ |
225 |
+ return 0; |
226 |
+ |
227 |
+ out_clear_rx_int: |
228 |
+@@ -1945,7 +1944,7 @@ static void bcm_sysport_netif_stop(struct net_device *dev) |
229 |
+ struct bcm_sysport_priv *priv = netdev_priv(dev); |
230 |
+ |
231 |
+ /* stop all software from updating hardware */ |
232 |
+- netif_tx_stop_all_queues(dev); |
233 |
++ netif_tx_disable(dev); |
234 |
+ napi_disable(&priv->napi); |
235 |
+ phy_stop(dev->phydev); |
236 |
+ |
237 |
+@@ -2267,12 +2266,12 @@ static int bcm_sysport_suspend(struct device *d) |
238 |
+ if (!netif_running(dev)) |
239 |
+ return 0; |
240 |
+ |
241 |
++ netif_device_detach(dev); |
242 |
++ |
243 |
+ bcm_sysport_netif_stop(dev); |
244 |
+ |
245 |
+ phy_suspend(dev->phydev); |
246 |
+ |
247 |
+- netif_device_detach(dev); |
248 |
+- |
249 |
+ /* Disable UniMAC RX */ |
250 |
+ umac_enable_set(priv, CMD_RX_EN, 0); |
251 |
+ |
252 |
+@@ -2356,8 +2355,6 @@ static int bcm_sysport_resume(struct device *d) |
253 |
+ goto out_free_rx_ring; |
254 |
+ } |
255 |
+ |
256 |
+- netif_device_attach(dev); |
257 |
+- |
258 |
+ /* RX pipe enable */ |
259 |
+ topctrl_writel(priv, 0, RX_FLUSH_CNTL); |
260 |
+ |
261 |
+@@ -2402,6 +2399,8 @@ static int bcm_sysport_resume(struct device *d) |
262 |
+ |
263 |
+ bcm_sysport_netif_start(dev); |
264 |
+ |
265 |
++ netif_device_attach(dev); |
266 |
++ |
267 |
+ return 0; |
268 |
+ |
269 |
+ out_free_rx_ring: |
270 |
+diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c |
271 |
+index 1b1d2a67f412..bc0221eafe5c 100644 |
272 |
+--- a/drivers/net/ethernet/broadcom/tg3.c |
273 |
++++ b/drivers/net/ethernet/broadcom/tg3.c |
274 |
+@@ -12395,6 +12395,7 @@ static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *e |
275 |
+ { |
276 |
+ struct tg3 *tp = netdev_priv(dev); |
277 |
+ int i, irq_sync = 0, err = 0; |
278 |
++ bool reset_phy = false; |
279 |
+ |
280 |
+ if ((ering->rx_pending > tp->rx_std_ring_mask) || |
281 |
+ (ering->rx_jumbo_pending > tp->rx_jmb_ring_mask) || |
282 |
+@@ -12426,7 +12427,13 @@ static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *e |
283 |
+ |
284 |
+ if (netif_running(dev)) { |
285 |
+ tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); |
286 |
+- err = tg3_restart_hw(tp, false); |
287 |
++ /* Reset PHY to avoid PHY lock up */ |
288 |
++ if (tg3_asic_rev(tp) == ASIC_REV_5717 || |
289 |
++ tg3_asic_rev(tp) == ASIC_REV_5719 || |
290 |
++ tg3_asic_rev(tp) == ASIC_REV_5720) |
291 |
++ reset_phy = true; |
292 |
++ |
293 |
++ err = tg3_restart_hw(tp, reset_phy); |
294 |
+ if (!err) |
295 |
+ tg3_netif_start(tp); |
296 |
+ } |
297 |
+@@ -12460,6 +12467,7 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam |
298 |
+ { |
299 |
+ struct tg3 *tp = netdev_priv(dev); |
300 |
+ int err = 0; |
301 |
++ bool reset_phy = false; |
302 |
+ |
303 |
+ if (tp->link_config.autoneg == AUTONEG_ENABLE) |
304 |
+ tg3_warn_mgmt_link_flap(tp); |
305 |
+@@ -12550,7 +12558,13 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam |
306 |
+ |
307 |
+ if (netif_running(dev)) { |
308 |
+ tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); |
309 |
+- err = tg3_restart_hw(tp, false); |
310 |
++ /* Reset PHY to avoid PHY lock up */ |
311 |
++ if (tg3_asic_rev(tp) == ASIC_REV_5717 || |
312 |
++ tg3_asic_rev(tp) == ASIC_REV_5719 || |
313 |
++ tg3_asic_rev(tp) == ASIC_REV_5720) |
314 |
++ reset_phy = true; |
315 |
++ |
316 |
++ err = tg3_restart_hw(tp, reset_phy); |
317 |
+ if (!err) |
318 |
+ tg3_netif_start(tp); |
319 |
+ } |
320 |
+diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c |
321 |
+index 046af22a37cb..5c7134ccc1fd 100644 |
322 |
+--- a/drivers/net/ethernet/ibm/ibmvnic.c |
323 |
++++ b/drivers/net/ethernet/ibm/ibmvnic.c |
324 |
+@@ -1259,7 +1259,7 @@ static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev) |
325 |
+ tx_crq.v1.sge_len = cpu_to_be32(skb->len); |
326 |
+ tx_crq.v1.ioba = cpu_to_be64(data_dma_addr); |
327 |
+ |
328 |
+- if (adapter->vlan_header_insertion) { |
329 |
++ if (adapter->vlan_header_insertion && skb_vlan_tag_present(skb)) { |
330 |
+ tx_crq.v1.flags2 |= IBMVNIC_TX_VLAN_INSERT; |
331 |
+ tx_crq.v1.vlan_id = cpu_to_be16(skb->vlan_tci); |
332 |
+ } |
333 |
+diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c |
334 |
+index 8b48338b4a70..18bb6798937b 100644 |
335 |
+--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c |
336 |
++++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c |
337 |
+@@ -3471,7 +3471,6 @@ static int mlxsw_sp_cpu_policers_set(struct mlxsw_core *mlxsw_core) |
338 |
+ burst_size = 7; |
339 |
+ break; |
340 |
+ case MLXSW_REG_HTGT_TRAP_GROUP_SP_IP2ME: |
341 |
+- is_bytes = true; |
342 |
+ rate = 4 * 1024; |
343 |
+ burst_size = 4; |
344 |
+ break; |
345 |
+diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c |
346 |
+index 7f90d5587653..fda701419039 100644 |
347 |
+--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c |
348 |
++++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c |
349 |
+@@ -102,12 +102,14 @@ int rmnet_vnd_newlink(u8 id, struct net_device *rmnet_dev, |
350 |
+ struct rmnet_port *port, |
351 |
+ struct net_device *real_dev) |
352 |
+ { |
353 |
+- struct rmnet_priv *priv; |
354 |
++ struct rmnet_priv *priv = netdev_priv(rmnet_dev); |
355 |
+ int rc; |
356 |
+ |
357 |
+ if (port->rmnet_devices[id]) |
358 |
+ return -EINVAL; |
359 |
+ |
360 |
++ priv->real_dev = real_dev; |
361 |
++ |
362 |
+ rc = register_netdevice(rmnet_dev); |
363 |
+ if (!rc) { |
364 |
+ port->rmnet_devices[id] = rmnet_dev; |
365 |
+@@ -115,9 +117,7 @@ int rmnet_vnd_newlink(u8 id, struct net_device *rmnet_dev, |
366 |
+ |
367 |
+ rmnet_dev->rtnl_link_ops = &rmnet_link_ops; |
368 |
+ |
369 |
+- priv = netdev_priv(rmnet_dev); |
370 |
+ priv->mux_id = id; |
371 |
+- priv->real_dev = real_dev; |
372 |
+ |
373 |
+ netdev_dbg(rmnet_dev, "rmnet dev created\n"); |
374 |
+ } |
375 |
+diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c |
376 |
+index 4333c6e14742..638923a0ca44 100644 |
377 |
+--- a/drivers/net/phy/mdio-gpio.c |
378 |
++++ b/drivers/net/phy/mdio-gpio.c |
379 |
+@@ -79,7 +79,7 @@ static void mdio_dir(struct mdiobb_ctrl *ctrl, int dir) |
380 |
+ * assume the pin serves as pull-up. If direction is |
381 |
+ * output, the default value is high. |
382 |
+ */ |
383 |
+- gpiod_set_value(bitbang->mdo, 1); |
384 |
++ gpiod_set_value_cansleep(bitbang->mdo, 1); |
385 |
+ return; |
386 |
+ } |
387 |
+ |
388 |
+@@ -94,7 +94,7 @@ static int mdio_get(struct mdiobb_ctrl *ctrl) |
389 |
+ struct mdio_gpio_info *bitbang = |
390 |
+ container_of(ctrl, struct mdio_gpio_info, ctrl); |
391 |
+ |
392 |
+- return gpiod_get_value(bitbang->mdio); |
393 |
++ return gpiod_get_value_cansleep(bitbang->mdio); |
394 |
+ } |
395 |
+ |
396 |
+ static void mdio_set(struct mdiobb_ctrl *ctrl, int what) |
397 |
+@@ -103,9 +103,9 @@ static void mdio_set(struct mdiobb_ctrl *ctrl, int what) |
398 |
+ container_of(ctrl, struct mdio_gpio_info, ctrl); |
399 |
+ |
400 |
+ if (bitbang->mdo) |
401 |
+- gpiod_set_value(bitbang->mdo, what); |
402 |
++ gpiod_set_value_cansleep(bitbang->mdo, what); |
403 |
+ else |
404 |
+- gpiod_set_value(bitbang->mdio, what); |
405 |
++ gpiod_set_value_cansleep(bitbang->mdio, what); |
406 |
+ } |
407 |
+ |
408 |
+ static void mdc_set(struct mdiobb_ctrl *ctrl, int what) |
409 |
+@@ -113,7 +113,7 @@ static void mdc_set(struct mdiobb_ctrl *ctrl, int what) |
410 |
+ struct mdio_gpio_info *bitbang = |
411 |
+ container_of(ctrl, struct mdio_gpio_info, ctrl); |
412 |
+ |
413 |
+- gpiod_set_value(bitbang->mdc, what); |
414 |
++ gpiod_set_value_cansleep(bitbang->mdc, what); |
415 |
+ } |
416 |
+ |
417 |
+ static const struct mdiobb_ops mdio_gpio_ops = { |
418 |
+diff --git a/drivers/net/tun.c b/drivers/net/tun.c |
419 |
+index 7f8c7e3aa356..0a008d136aae 100644 |
420 |
+--- a/drivers/net/tun.c |
421 |
++++ b/drivers/net/tun.c |
422 |
+@@ -1214,6 +1214,7 @@ static void tun_rx_batched(struct tun_struct *tun, struct tun_file *tfile, |
423 |
+ |
424 |
+ if (!rx_batched || (!more && skb_queue_empty(queue))) { |
425 |
+ local_bh_disable(); |
426 |
++ skb_record_rx_queue(skb, tfile->queue_index); |
427 |
+ netif_receive_skb(skb); |
428 |
+ local_bh_enable(); |
429 |
+ return; |
430 |
+@@ -1233,8 +1234,11 @@ static void tun_rx_batched(struct tun_struct *tun, struct tun_file *tfile, |
431 |
+ struct sk_buff *nskb; |
432 |
+ |
433 |
+ local_bh_disable(); |
434 |
+- while ((nskb = __skb_dequeue(&process_queue))) |
435 |
++ while ((nskb = __skb_dequeue(&process_queue))) { |
436 |
++ skb_record_rx_queue(nskb, tfile->queue_index); |
437 |
+ netif_receive_skb(nskb); |
438 |
++ } |
439 |
++ skb_record_rx_queue(skb, tfile->queue_index); |
440 |
+ netif_receive_skb(skb); |
441 |
+ local_bh_enable(); |
442 |
+ } |
443 |
+diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c |
444 |
+index 99e684e39d35..2f65975a121f 100644 |
445 |
+--- a/drivers/net/usb/smsc95xx.c |
446 |
++++ b/drivers/net/usb/smsc95xx.c |
447 |
+@@ -1321,6 +1321,8 @@ static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf) |
448 |
+ dev->net->ethtool_ops = &smsc95xx_ethtool_ops; |
449 |
+ dev->net->flags |= IFF_MULTICAST; |
450 |
+ dev->net->hard_header_len += SMSC95XX_TX_OVERHEAD_CSUM; |
451 |
++ dev->net->min_mtu = ETH_MIN_MTU; |
452 |
++ dev->net->max_mtu = ETH_DATA_LEN; |
453 |
+ dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; |
454 |
+ |
455 |
+ pdata->dev = dev; |
456 |
+@@ -1598,6 +1600,8 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message) |
457 |
+ return ret; |
458 |
+ } |
459 |
+ |
460 |
++ cancel_delayed_work_sync(&pdata->carrier_check); |
461 |
++ |
462 |
+ if (pdata->suspend_flags) { |
463 |
+ netdev_warn(dev->net, "error during last resume\n"); |
464 |
+ pdata->suspend_flags = 0; |
465 |
+@@ -1840,6 +1844,11 @@ done: |
466 |
+ */ |
467 |
+ if (ret && PMSG_IS_AUTO(message)) |
468 |
+ usbnet_resume(intf); |
469 |
++ |
470 |
++ if (ret) |
471 |
++ schedule_delayed_work(&pdata->carrier_check, |
472 |
++ CARRIER_CHECK_DELAY); |
473 |
++ |
474 |
+ return ret; |
475 |
+ } |
476 |
+ |
477 |
+diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h |
478 |
+index cfe971296835..e2554c1bcf58 100644 |
479 |
+--- a/include/uapi/linux/sctp.h |
480 |
++++ b/include/uapi/linux/sctp.h |
481 |
+@@ -519,6 +519,8 @@ struct sctp_assoc_reset_event { |
482 |
+ |
483 |
+ #define SCTP_ASSOC_CHANGE_DENIED 0x0004 |
484 |
+ #define SCTP_ASSOC_CHANGE_FAILED 0x0008 |
485 |
++#define SCTP_STREAM_CHANGE_DENIED SCTP_ASSOC_CHANGE_DENIED |
486 |
++#define SCTP_STREAM_CHANGE_FAILED SCTP_ASSOC_CHANGE_FAILED |
487 |
+ struct sctp_stream_change_event { |
488 |
+ __u16 strchange_type; |
489 |
+ __u16 strchange_flags; |
490 |
+diff --git a/kernel/cpu.c b/kernel/cpu.c |
491 |
+index 90cf6a04e08a..f3f389e33343 100644 |
492 |
+--- a/kernel/cpu.c |
493 |
++++ b/kernel/cpu.c |
494 |
+@@ -2045,12 +2045,6 @@ static void cpuhp_online_cpu_device(unsigned int cpu) |
495 |
+ kobject_uevent(&dev->kobj, KOBJ_ONLINE); |
496 |
+ } |
497 |
+ |
498 |
+-/* |
499 |
+- * Architectures that need SMT-specific errata handling during SMT hotplug |
500 |
+- * should override this. |
501 |
+- */ |
502 |
+-void __weak arch_smt_update(void) { }; |
503 |
+- |
504 |
+ static int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) |
505 |
+ { |
506 |
+ int cpu, ret = 0; |
507 |
+@@ -2077,10 +2071,8 @@ static int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) |
508 |
+ */ |
509 |
+ cpuhp_offline_cpu_device(cpu); |
510 |
+ } |
511 |
+- if (!ret) { |
512 |
++ if (!ret) |
513 |
+ cpu_smt_control = ctrlval; |
514 |
+- arch_smt_update(); |
515 |
+- } |
516 |
+ cpu_maps_update_done(); |
517 |
+ return ret; |
518 |
+ } |
519 |
+@@ -2091,7 +2083,6 @@ static int cpuhp_smt_enable(void) |
520 |
+ |
521 |
+ cpu_maps_update_begin(); |
522 |
+ cpu_smt_control = CPU_SMT_ENABLED; |
523 |
+- arch_smt_update(); |
524 |
+ for_each_present_cpu(cpu) { |
525 |
+ /* Skip online CPUs and CPUs on offline nodes */ |
526 |
+ if (cpu_online(cpu) || !node_online(cpu_to_node(cpu))) |
527 |
+diff --git a/net/core/dev.c b/net/core/dev.c |
528 |
+index e8a66ad6d07c..4337450a5fdb 100644 |
529 |
+--- a/net/core/dev.c |
530 |
++++ b/net/core/dev.c |
531 |
+@@ -4993,6 +4993,10 @@ static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb) |
532 |
+ skb->vlan_tci = 0; |
533 |
+ skb->dev = napi->dev; |
534 |
+ skb->skb_iif = 0; |
535 |
++ |
536 |
++ /* eth_type_trans() assumes pkt_type is PACKET_HOST */ |
537 |
++ skb->pkt_type = PACKET_HOST; |
538 |
++ |
539 |
+ skb->encapsulation = 0; |
540 |
+ skb_shinfo(skb)->gso_type = 0; |
541 |
+ skb->truesize = SKB_TRUESIZE(skb_end_offset(skb)); |
542 |
+diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c |
543 |
+index d8796a7874b6..e2e716003ede 100644 |
544 |
+--- a/net/core/flow_dissector.c |
545 |
++++ b/net/core/flow_dissector.c |
546 |
+@@ -838,8 +838,8 @@ ip_proto_again: |
547 |
+ break; |
548 |
+ } |
549 |
+ |
550 |
+- if (dissector_uses_key(flow_dissector, |
551 |
+- FLOW_DISSECTOR_KEY_PORTS)) { |
552 |
++ if (dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_PORTS) && |
553 |
++ !(key_control->flags & FLOW_DIS_IS_FRAGMENT)) { |
554 |
+ key_ports = skb_flow_dissector_target(flow_dissector, |
555 |
+ FLOW_DISSECTOR_KEY_PORTS, |
556 |
+ target_container); |
557 |
+diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c |
558 |
+index f6764537148c..653be98fe3fb 100644 |
559 |
+--- a/net/ipv4/inet_fragment.c |
560 |
++++ b/net/ipv4/inet_fragment.c |
561 |
+@@ -180,21 +180,22 @@ static struct inet_frag_queue *inet_frag_alloc(struct netns_frags *nf, |
562 |
+ } |
563 |
+ |
564 |
+ static struct inet_frag_queue *inet_frag_create(struct netns_frags *nf, |
565 |
+- void *arg) |
566 |
++ void *arg, |
567 |
++ struct inet_frag_queue **prev) |
568 |
+ { |
569 |
+ struct inet_frags *f = nf->f; |
570 |
+ struct inet_frag_queue *q; |
571 |
+- int err; |
572 |
+ |
573 |
+ q = inet_frag_alloc(nf, f, arg); |
574 |
+- if (!q) |
575 |
++ if (!q) { |
576 |
++ *prev = ERR_PTR(-ENOMEM); |
577 |
+ return NULL; |
578 |
+- |
579 |
++ } |
580 |
+ mod_timer(&q->timer, jiffies + nf->timeout); |
581 |
+ |
582 |
+- err = rhashtable_insert_fast(&nf->rhashtable, &q->node, |
583 |
+- f->rhash_params); |
584 |
+- if (err < 0) { |
585 |
++ *prev = rhashtable_lookup_get_insert_key(&nf->rhashtable, &q->key, |
586 |
++ &q->node, f->rhash_params); |
587 |
++ if (*prev) { |
588 |
+ q->flags |= INET_FRAG_COMPLETE; |
589 |
+ inet_frag_kill(q); |
590 |
+ inet_frag_destroy(q); |
591 |
+@@ -206,19 +207,20 @@ static struct inet_frag_queue *inet_frag_create(struct netns_frags *nf, |
592 |
+ /* TODO : call from rcu_read_lock() and no longer use refcount_inc_not_zero() */ |
593 |
+ struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, void *key) |
594 |
+ { |
595 |
+- struct inet_frag_queue *fq; |
596 |
++ struct inet_frag_queue *fq = NULL, *prev; |
597 |
+ |
598 |
+ rcu_read_lock(); |
599 |
+ |
600 |
+- fq = rhashtable_lookup(&nf->rhashtable, key, nf->f->rhash_params); |
601 |
+- if (fq) { |
602 |
++ prev = rhashtable_lookup(&nf->rhashtable, key, nf->f->rhash_params); |
603 |
++ if (!prev) |
604 |
++ fq = inet_frag_create(nf, key, &prev); |
605 |
++ if (prev && !IS_ERR(prev)) { |
606 |
++ fq = prev; |
607 |
+ if (!refcount_inc_not_zero(&fq->refcnt)) |
608 |
+ fq = NULL; |
609 |
+- rcu_read_unlock(); |
610 |
+- return fq; |
611 |
+ } |
612 |
+ rcu_read_unlock(); |
613 |
+ |
614 |
+- return inet_frag_create(nf, key); |
615 |
++ return fq; |
616 |
+ } |
617 |
+ EXPORT_SYMBOL(inet_frag_find); |
618 |
+diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c |
619 |
+index 2f39479be92f..423091727e15 100644 |
620 |
+--- a/net/ipv4/ip_tunnel_core.c |
621 |
++++ b/net/ipv4/ip_tunnel_core.c |
622 |
+@@ -80,7 +80,7 @@ void iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb, |
623 |
+ |
624 |
+ iph->version = 4; |
625 |
+ iph->ihl = sizeof(struct iphdr) >> 2; |
626 |
+- iph->frag_off = df; |
627 |
++ iph->frag_off = ip_mtu_locked(&rt->dst) ? 0 : df; |
628 |
+ iph->protocol = proto; |
629 |
+ iph->tos = tos; |
630 |
+ iph->daddr = dst; |
631 |
+diff --git a/net/ipv6/route.c b/net/ipv6/route.c |
632 |
+index 30204bc2fc48..74dd35d6567c 100644 |
633 |
+--- a/net/ipv6/route.c |
634 |
++++ b/net/ipv6/route.c |
635 |
+@@ -1547,10 +1547,13 @@ EXPORT_SYMBOL_GPL(ip6_update_pmtu); |
636 |
+ |
637 |
+ void ip6_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, __be32 mtu) |
638 |
+ { |
639 |
++ int oif = sk->sk_bound_dev_if; |
640 |
+ struct dst_entry *dst; |
641 |
+ |
642 |
+- ip6_update_pmtu(skb, sock_net(sk), mtu, |
643 |
+- sk->sk_bound_dev_if, sk->sk_mark, sk->sk_uid); |
644 |
++ if (!oif && skb->dev) |
645 |
++ oif = l3mdev_master_ifindex(skb->dev); |
646 |
++ |
647 |
++ ip6_update_pmtu(skb, sock_net(sk), mtu, oif, sk->sk_mark, sk->sk_uid); |
648 |
+ |
649 |
+ dst = __sk_dst_get(sk); |
650 |
+ if (!dst || !dst->obsolete || |
651 |
+diff --git a/net/sctp/socket.c b/net/sctp/socket.c |
652 |
+index d87d56978b4c..6a2532370545 100644 |
653 |
+--- a/net/sctp/socket.c |
654 |
++++ b/net/sctp/socket.c |
655 |
+@@ -3750,32 +3750,16 @@ static int sctp_setsockopt_pr_supported(struct sock *sk, |
656 |
+ unsigned int optlen) |
657 |
+ { |
658 |
+ struct sctp_assoc_value params; |
659 |
+- struct sctp_association *asoc; |
660 |
+- int retval = -EINVAL; |
661 |
+ |
662 |
+ if (optlen != sizeof(params)) |
663 |
+- goto out; |
664 |
+- |
665 |
+- if (copy_from_user(¶ms, optval, optlen)) { |
666 |
+- retval = -EFAULT; |
667 |
+- goto out; |
668 |
+- } |
669 |
+- |
670 |
+- asoc = sctp_id2assoc(sk, params.assoc_id); |
671 |
+- if (asoc) { |
672 |
+- asoc->prsctp_enable = !!params.assoc_value; |
673 |
+- } else if (!params.assoc_id) { |
674 |
+- struct sctp_sock *sp = sctp_sk(sk); |
675 |
++ return -EINVAL; |
676 |
+ |
677 |
+- sp->ep->prsctp_enable = !!params.assoc_value; |
678 |
+- } else { |
679 |
+- goto out; |
680 |
+- } |
681 |
++ if (copy_from_user(¶ms, optval, optlen)) |
682 |
++ return -EFAULT; |
683 |
+ |
684 |
+- retval = 0; |
685 |
++ sctp_sk(sk)->ep->prsctp_enable = !!params.assoc_value; |
686 |
+ |
687 |
+-out: |
688 |
+- return retval; |
689 |
++ return 0; |
690 |
+ } |
691 |
+ |
692 |
+ static int sctp_setsockopt_default_prinfo(struct sock *sk, |
693 |
+diff --git a/net/sctp/stream.c b/net/sctp/stream.c |
694 |
+index 9ea6057ed28b..61273534ae10 100644 |
695 |
+--- a/net/sctp/stream.c |
696 |
++++ b/net/sctp/stream.c |
697 |
+@@ -310,7 +310,6 @@ int sctp_send_add_streams(struct sctp_association *asoc, |
698 |
+ goto out; |
699 |
+ } |
700 |
+ |
701 |
+- stream->incnt = incnt; |
702 |
+ stream->outcnt = outcnt; |
703 |
+ |
704 |
+ asoc->strreset_outstanding = !!out + !!in; |