1 |
commit: a811c8abe9884633ef56627f2187fb0a30fd4368 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 18 09:50:51 2022 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 18 09:50:51 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=a811c8ab |
7 |
|
8 |
Linux patch 4.14.280 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1279_linux-4.14.280.patch | 502 ++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 506 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 4b838702..135b502d 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -1163,6 +1163,10 @@ Patch: 1278_linux-4.14.279.patch |
21 |
From: https://www.kernel.org |
22 |
Desc: Linux 4.14.279 |
23 |
|
24 |
+Patch: 1279_linux-4.14.280.patch |
25 |
+From: https://www.kernel.org |
26 |
+Desc: Linux 4.14.280 |
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/1279_linux-4.14.280.patch b/1279_linux-4.14.280.patch |
33 |
new file mode 100644 |
34 |
index 00000000..39845c23 |
35 |
--- /dev/null |
36 |
+++ b/1279_linux-4.14.280.patch |
37 |
@@ -0,0 +1,502 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index efe93f82073af..4207e0002fbb9 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 = 279 |
47 |
++SUBLEVEL = 280 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = Petit Gorille |
50 |
+ |
51 |
+diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c |
52 |
+index 3ba9b6ad0281b..4042062df4092 100644 |
53 |
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c |
54 |
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c |
55 |
+@@ -522,7 +522,7 @@ static int vmw_fb_kms_detach(struct vmw_fb_par *par, |
56 |
+ |
57 |
+ static int vmw_fb_kms_framebuffer(struct fb_info *info) |
58 |
+ { |
59 |
+- struct drm_mode_fb_cmd2 mode_cmd; |
60 |
++ struct drm_mode_fb_cmd2 mode_cmd = {0}; |
61 |
+ struct vmw_fb_par *par = info->par; |
62 |
+ struct fb_var_screeninfo *var = &info->var; |
63 |
+ struct drm_framebuffer *cur_fb; |
64 |
+diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig |
65 |
+index d65431417b17c..e02d7bfc4ae46 100644 |
66 |
+--- a/drivers/hwmon/Kconfig |
67 |
++++ b/drivers/hwmon/Kconfig |
68 |
+@@ -793,7 +793,7 @@ config SENSORS_LTC4261 |
69 |
+ |
70 |
+ config SENSORS_LTQ_CPUTEMP |
71 |
+ bool "Lantiq cpu temperature sensor driver" |
72 |
+- depends on LANTIQ |
73 |
++ depends on SOC_XWAY |
74 |
+ help |
75 |
+ If you say yes here you get support for the temperature |
76 |
+ sensor inside your CPU. |
77 |
+diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c |
78 |
+index ca54ce5c8e10c..4010b61743f5b 100644 |
79 |
+--- a/drivers/hwmon/f71882fg.c |
80 |
++++ b/drivers/hwmon/f71882fg.c |
81 |
+@@ -1590,8 +1590,9 @@ static ssize_t show_temp(struct device *dev, struct device_attribute *devattr, |
82 |
+ temp *= 125; |
83 |
+ if (sign) |
84 |
+ temp -= 128000; |
85 |
+- } else |
86 |
+- temp = data->temp[nr] * 1000; |
87 |
++ } else { |
88 |
++ temp = ((s8)data->temp[nr]) * 1000; |
89 |
++ } |
90 |
+ |
91 |
+ return sprintf(buf, "%d\n", temp); |
92 |
+ } |
93 |
+diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c |
94 |
+index 2d92a9fe4606c..4f0da3963b013 100644 |
95 |
+--- a/drivers/net/ethernet/sfc/ef10.c |
96 |
++++ b/drivers/net/ethernet/sfc/ef10.c |
97 |
+@@ -5956,6 +5956,11 @@ static int efx_ef10_mtd_probe(struct efx_nic *efx) |
98 |
+ n_parts++; |
99 |
+ } |
100 |
+ |
101 |
++ if (!n_parts) { |
102 |
++ kfree(parts); |
103 |
++ return 0; |
104 |
++ } |
105 |
++ |
106 |
+ rc = efx_mtd_add(efx, &parts[0].common, n_parts, sizeof(*parts)); |
107 |
+ fail: |
108 |
+ if (rc) |
109 |
+diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c |
110 |
+index ee1eb14ae8fc9..885c4352bdefb 100644 |
111 |
+--- a/drivers/net/wireless/mac80211_hwsim.c |
112 |
++++ b/drivers/net/wireless/mac80211_hwsim.c |
113 |
+@@ -2025,11 +2025,13 @@ static void hw_scan_work(struct work_struct *work) |
114 |
+ if (req->ie_len) |
115 |
+ skb_put_data(probe, req->ie, req->ie_len); |
116 |
+ |
117 |
++ rcu_read_lock(); |
118 |
+ if (!ieee80211_tx_prepare_skb(hwsim->hw, |
119 |
+ hwsim->hw_scan_vif, |
120 |
+ probe, |
121 |
+ hwsim->tmp_chan->band, |
122 |
+ NULL)) { |
123 |
++ rcu_read_unlock(); |
124 |
+ kfree_skb(probe); |
125 |
+ continue; |
126 |
+ } |
127 |
+@@ -2037,6 +2039,7 @@ static void hw_scan_work(struct work_struct *work) |
128 |
+ local_bh_disable(); |
129 |
+ mac80211_hwsim_tx_frame(hwsim->hw, probe, |
130 |
+ hwsim->tmp_chan); |
131 |
++ rcu_read_unlock(); |
132 |
+ local_bh_enable(); |
133 |
+ } |
134 |
+ } |
135 |
+diff --git a/drivers/s390/net/ctcm_mpc.c b/drivers/s390/net/ctcm_mpc.c |
136 |
+index e02f295d38a9b..07d9668137df3 100644 |
137 |
+--- a/drivers/s390/net/ctcm_mpc.c |
138 |
++++ b/drivers/s390/net/ctcm_mpc.c |
139 |
+@@ -625,8 +625,6 @@ static void mpc_rcvd_sweep_resp(struct mpcg_info *mpcginfo) |
140 |
+ ctcm_clear_busy_do(dev); |
141 |
+ } |
142 |
+ |
143 |
+- kfree(mpcginfo); |
144 |
+- |
145 |
+ return; |
146 |
+ |
147 |
+ } |
148 |
+@@ -1205,10 +1203,10 @@ static void ctcmpc_unpack_skb(struct channel *ch, struct sk_buff *pskb) |
149 |
+ CTCM_FUNTAIL, dev->name); |
150 |
+ priv->stats.rx_dropped++; |
151 |
+ /* mpcginfo only used for non-data transfers */ |
152 |
+- kfree(mpcginfo); |
153 |
+ if (do_debug_data) |
154 |
+ ctcmpc_dump_skb(pskb, -8); |
155 |
+ } |
156 |
++ kfree(mpcginfo); |
157 |
+ } |
158 |
+ done: |
159 |
+ |
160 |
+@@ -1991,7 +1989,6 @@ static void mpc_action_rcvd_xid0(fsm_instance *fsm, int event, void *arg) |
161 |
+ } |
162 |
+ break; |
163 |
+ } |
164 |
+- kfree(mpcginfo); |
165 |
+ |
166 |
+ CTCM_PR_DEBUG("ctcmpc:%s() %s xid2:%i xid7:%i xidt_p2:%i \n", |
167 |
+ __func__, ch->id, grp->outstanding_xid2, |
168 |
+@@ -2052,7 +2049,6 @@ static void mpc_action_rcvd_xid7(fsm_instance *fsm, int event, void *arg) |
169 |
+ mpc_validate_xid(mpcginfo); |
170 |
+ break; |
171 |
+ } |
172 |
+- kfree(mpcginfo); |
173 |
+ return; |
174 |
+ } |
175 |
+ |
176 |
+diff --git a/drivers/s390/net/ctcm_sysfs.c b/drivers/s390/net/ctcm_sysfs.c |
177 |
+index ded1930a00b2d..e3813a7aa5e68 100644 |
178 |
+--- a/drivers/s390/net/ctcm_sysfs.c |
179 |
++++ b/drivers/s390/net/ctcm_sysfs.c |
180 |
+@@ -39,11 +39,12 @@ static ssize_t ctcm_buffer_write(struct device *dev, |
181 |
+ struct ctcm_priv *priv = dev_get_drvdata(dev); |
182 |
+ int rc; |
183 |
+ |
184 |
+- ndev = priv->channel[CTCM_READ]->netdev; |
185 |
+- if (!(priv && priv->channel[CTCM_READ] && ndev)) { |
186 |
++ if (!(priv && priv->channel[CTCM_READ] && |
187 |
++ priv->channel[CTCM_READ]->netdev)) { |
188 |
+ CTCM_DBF_TEXT(SETUP, CTC_DBF_ERROR, "bfnondev"); |
189 |
+ return -ENODEV; |
190 |
+ } |
191 |
++ ndev = priv->channel[CTCM_READ]->netdev; |
192 |
+ |
193 |
+ rc = kstrtouint(buf, 0, &bs1); |
194 |
+ if (rc) |
195 |
+diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c |
196 |
+index d01b5c2a77600..da4d7284db672 100644 |
197 |
+--- a/drivers/s390/net/lcs.c |
198 |
++++ b/drivers/s390/net/lcs.c |
199 |
+@@ -1757,10 +1757,11 @@ lcs_get_control(struct lcs_card *card, struct lcs_cmd *cmd) |
200 |
+ lcs_schedule_recovery(card); |
201 |
+ break; |
202 |
+ case LCS_CMD_STOPLAN: |
203 |
+- pr_warn("Stoplan for %s initiated by LGW\n", |
204 |
+- card->dev->name); |
205 |
+- if (card->dev) |
206 |
++ if (card->dev) { |
207 |
++ pr_warn("Stoplan for %s initiated by LGW\n", |
208 |
++ card->dev->name); |
209 |
+ netif_carrier_off(card->dev); |
210 |
++ } |
211 |
+ break; |
212 |
+ default: |
213 |
+ LCS_DBF_TEXT(5, trace, "noLGWcmd"); |
214 |
+diff --git a/drivers/tty/serial/digicolor-usart.c b/drivers/tty/serial/digicolor-usart.c |
215 |
+index 50ec5f1ac77f4..794864fac6250 100644 |
216 |
+--- a/drivers/tty/serial/digicolor-usart.c |
217 |
++++ b/drivers/tty/serial/digicolor-usart.c |
218 |
+@@ -476,10 +476,10 @@ static int digicolor_uart_probe(struct platform_device *pdev) |
219 |
+ return PTR_ERR(uart_clk); |
220 |
+ |
221 |
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
222 |
+- dp->port.mapbase = res->start; |
223 |
+ dp->port.membase = devm_ioremap_resource(&pdev->dev, res); |
224 |
+ if (IS_ERR(dp->port.membase)) |
225 |
+ return PTR_ERR(dp->port.membase); |
226 |
++ dp->port.mapbase = res->start; |
227 |
+ |
228 |
+ irq = platform_get_irq(pdev, 0); |
229 |
+ if (irq < 0) |
230 |
+diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c |
231 |
+index ec2de4e448c41..d80718629a765 100644 |
232 |
+--- a/drivers/usb/class/cdc-wdm.c |
233 |
++++ b/drivers/usb/class/cdc-wdm.c |
234 |
+@@ -731,6 +731,7 @@ static int wdm_release(struct inode *inode, struct file *file) |
235 |
+ kill_urbs(desc); |
236 |
+ spin_lock_irq(&desc->iuspin); |
237 |
+ desc->resp_count = 0; |
238 |
++ clear_bit(WDM_RESPONDING, &desc->flags); |
239 |
+ spin_unlock_irq(&desc->iuspin); |
240 |
+ desc->manage_power(desc->intf, 0); |
241 |
+ } else { |
242 |
+diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c |
243 |
+index 56564006f7380..a58335adab8af 100644 |
244 |
+--- a/drivers/usb/serial/option.c |
245 |
++++ b/drivers/usb/serial/option.c |
246 |
+@@ -2125,10 +2125,14 @@ static const struct usb_device_id option_ids[] = { |
247 |
+ .driver_info = RSVD(3) }, |
248 |
+ { USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 (IOT version) */ |
249 |
+ .driver_info = RSVD(4) | RSVD(5) | RSVD(6) }, |
250 |
++ { USB_DEVICE(0x1782, 0x4d10) }, /* Fibocom L610 (AT mode) */ |
251 |
++ { USB_DEVICE_INTERFACE_CLASS(0x1782, 0x4d11, 0xff) }, /* Fibocom L610 (ECM/RNDIS mode) */ |
252 |
+ { USB_DEVICE(0x2cb7, 0x0104), /* Fibocom NL678 series */ |
253 |
+ .driver_info = RSVD(4) | RSVD(5) }, |
254 |
+ { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0105, 0xff), /* Fibocom NL678 series */ |
255 |
+ .driver_info = RSVD(6) }, |
256 |
++ { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0106, 0xff) }, /* Fibocom MA510 (ECM mode w/ diag intf.) */ |
257 |
++ { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x010a, 0xff) }, /* Fibocom MA510 (ECM mode) */ |
258 |
+ { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0xff, 0x30) }, /* Fibocom FG150 Diag */ |
259 |
+ { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0, 0) }, /* Fibocom FG150 AT */ |
260 |
+ { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a0, 0xff) }, /* Fibocom NL668-AM/NL652-EU (laptop MBIM) */ |
261 |
+diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c |
262 |
+index 103b77f56aec4..80791adab5c48 100644 |
263 |
+--- a/drivers/usb/serial/pl2303.c |
264 |
++++ b/drivers/usb/serial/pl2303.c |
265 |
+@@ -103,6 +103,7 @@ static const struct usb_device_id id_table[] = { |
266 |
+ { USB_DEVICE(HP_VENDOR_ID, HP_LCM220_PRODUCT_ID) }, |
267 |
+ { USB_DEVICE(HP_VENDOR_ID, HP_LCM960_PRODUCT_ID) }, |
268 |
+ { USB_DEVICE(HP_VENDOR_ID, HP_LM920_PRODUCT_ID) }, |
269 |
++ { USB_DEVICE(HP_VENDOR_ID, HP_LM930_PRODUCT_ID) }, |
270 |
+ { USB_DEVICE(HP_VENDOR_ID, HP_LM940_PRODUCT_ID) }, |
271 |
+ { USB_DEVICE(HP_VENDOR_ID, HP_TD620_PRODUCT_ID) }, |
272 |
+ { USB_DEVICE(CRESSI_VENDOR_ID, CRESSI_EDY_PRODUCT_ID) }, |
273 |
+diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h |
274 |
+index c1b93d101990b..ddd75529ab464 100644 |
275 |
+--- a/drivers/usb/serial/pl2303.h |
276 |
++++ b/drivers/usb/serial/pl2303.h |
277 |
+@@ -134,6 +134,7 @@ |
278 |
+ #define HP_TD620_PRODUCT_ID 0x0956 |
279 |
+ #define HP_LD960_PRODUCT_ID 0x0b39 |
280 |
+ #define HP_LD381_PRODUCT_ID 0x0f7f |
281 |
++#define HP_LM930_PRODUCT_ID 0x0f9b |
282 |
+ #define HP_LCM220_PRODUCT_ID 0x3139 |
283 |
+ #define HP_LCM960_PRODUCT_ID 0x3239 |
284 |
+ #define HP_LD220_PRODUCT_ID 0x3524 |
285 |
+diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c |
286 |
+index 8240c95c1d229..f926a0b0b133f 100644 |
287 |
+--- a/drivers/usb/serial/qcserial.c |
288 |
++++ b/drivers/usb/serial/qcserial.c |
289 |
+@@ -170,6 +170,8 @@ static const struct usb_device_id id_table[] = { |
290 |
+ {DEVICE_SWI(0x1199, 0x9090)}, /* Sierra Wireless EM7565 QDL */ |
291 |
+ {DEVICE_SWI(0x1199, 0x9091)}, /* Sierra Wireless EM7565 */ |
292 |
+ {DEVICE_SWI(0x1199, 0x90d2)}, /* Sierra Wireless EM9191 QDL */ |
293 |
++ {DEVICE_SWI(0x1199, 0xc080)}, /* Sierra Wireless EM7590 QDL */ |
294 |
++ {DEVICE_SWI(0x1199, 0xc081)}, /* Sierra Wireless EM7590 */ |
295 |
+ {DEVICE_SWI(0x413c, 0x81a2)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card */ |
296 |
+ {DEVICE_SWI(0x413c, 0x81a3)}, /* Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card */ |
297 |
+ {DEVICE_SWI(0x413c, 0x81a4)}, /* Dell Wireless 5570e HSPA+ (42Mbps) Mobile Broadband Card */ |
298 |
+diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h |
299 |
+index de123f436f1a3..3a308bf98fc30 100644 |
300 |
+--- a/include/linux/netdev_features.h |
301 |
++++ b/include/linux/netdev_features.h |
302 |
+@@ -145,7 +145,7 @@ enum { |
303 |
+ #define NETIF_F_HW_ESP_TX_CSUM __NETIF_F(HW_ESP_TX_CSUM) |
304 |
+ #define NETIF_F_RX_UDP_TUNNEL_PORT __NETIF_F(RX_UDP_TUNNEL_PORT) |
305 |
+ |
306 |
+-/* Finds the next feature with the highest number of the range of start till 0. |
307 |
++/* Finds the next feature with the highest number of the range of start-1 till 0. |
308 |
+ */ |
309 |
+ static inline int find_next_netdev_feature(u64 feature, unsigned long start) |
310 |
+ { |
311 |
+@@ -164,7 +164,7 @@ static inline int find_next_netdev_feature(u64 feature, unsigned long start) |
312 |
+ for ((bit) = find_next_netdev_feature((mask_addr), \ |
313 |
+ NETDEV_FEATURE_COUNT); \ |
314 |
+ (bit) >= 0; \ |
315 |
+- (bit) = find_next_netdev_feature((mask_addr), (bit) - 1)) |
316 |
++ (bit) = find_next_netdev_feature((mask_addr), (bit))) |
317 |
+ |
318 |
+ /* Features valid for ethtool to change */ |
319 |
+ /* = all defined minus driver/device-class-related */ |
320 |
+diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c |
321 |
+index bf858e416b5e4..0b82e3857d337 100644 |
322 |
+--- a/kernel/cgroup/cpuset.c |
323 |
++++ b/kernel/cgroup/cpuset.c |
324 |
+@@ -2403,8 +2403,11 @@ static struct notifier_block cpuset_track_online_nodes_nb = { |
325 |
+ */ |
326 |
+ void __init cpuset_init_smp(void) |
327 |
+ { |
328 |
+- cpumask_copy(top_cpuset.cpus_allowed, cpu_active_mask); |
329 |
+- top_cpuset.mems_allowed = node_states[N_MEMORY]; |
330 |
++ /* |
331 |
++ * cpus_allowd/mems_allowed set to v2 values in the initial |
332 |
++ * cpuset_bind() call will be reset to v1 values in another |
333 |
++ * cpuset_bind() call when v1 cpuset is mounted. |
334 |
++ */ |
335 |
+ top_cpuset.old_mems_allowed = top_cpuset.mems_allowed; |
336 |
+ |
337 |
+ cpumask_copy(top_cpuset.effective_cpus, cpu_active_mask); |
338 |
+diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c |
339 |
+index 4842436c55f32..a50c87329bc52 100644 |
340 |
+--- a/net/batman-adv/fragmentation.c |
341 |
++++ b/net/batman-adv/fragmentation.c |
342 |
+@@ -489,6 +489,17 @@ int batadv_frag_send_packet(struct sk_buff *skb, |
343 |
+ goto free_skb; |
344 |
+ } |
345 |
+ |
346 |
++ /* GRO might have added fragments to the fragment list instead of |
347 |
++ * frags[]. But this is not handled by skb_split and must be |
348 |
++ * linearized to avoid incorrect length information after all |
349 |
++ * batman-adv fragments were created and submitted to the |
350 |
++ * hard-interface |
351 |
++ */ |
352 |
++ if (skb_has_frag_list(skb) && __skb_linearize(skb)) { |
353 |
++ ret = -ENOMEM; |
354 |
++ goto free_skb; |
355 |
++ } |
356 |
++ |
357 |
+ /* Create one header to be copied to all fragments */ |
358 |
+ frag_header.packet_type = BATADV_UNICAST_FRAG; |
359 |
+ frag_header.version = BATADV_COMPAT_VERSION; |
360 |
+diff --git a/net/core/secure_seq.c b/net/core/secure_seq.c |
361 |
+index 7232274de334b..17683aea8a355 100644 |
362 |
+--- a/net/core/secure_seq.c |
363 |
++++ b/net/core/secure_seq.c |
364 |
+@@ -22,6 +22,8 @@ |
365 |
+ static siphash_key_t net_secret __read_mostly; |
366 |
+ static siphash_key_t ts_secret __read_mostly; |
367 |
+ |
368 |
++#define EPHEMERAL_PORT_SHUFFLE_PERIOD (10 * HZ) |
369 |
++ |
370 |
+ static __always_inline void net_secret_init(void) |
371 |
+ { |
372 |
+ net_get_random_once(&net_secret, sizeof(net_secret)); |
373 |
+@@ -100,11 +102,13 @@ u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, |
374 |
+ const struct { |
375 |
+ struct in6_addr saddr; |
376 |
+ struct in6_addr daddr; |
377 |
++ unsigned int timeseed; |
378 |
+ __be16 dport; |
379 |
+ } __aligned(SIPHASH_ALIGNMENT) combined = { |
380 |
+ .saddr = *(struct in6_addr *)saddr, |
381 |
+ .daddr = *(struct in6_addr *)daddr, |
382 |
+- .dport = dport |
383 |
++ .timeseed = jiffies / EPHEMERAL_PORT_SHUFFLE_PERIOD, |
384 |
++ .dport = dport, |
385 |
+ }; |
386 |
+ net_secret_init(); |
387 |
+ return siphash(&combined, offsetofend(typeof(combined), dport), |
388 |
+@@ -144,8 +148,10 @@ u32 secure_tcp_seq(__be32 saddr, __be32 daddr, |
389 |
+ u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport) |
390 |
+ { |
391 |
+ net_secret_init(); |
392 |
+- return siphash_3u32((__force u32)saddr, (__force u32)daddr, |
393 |
+- (__force u16)dport, &net_secret); |
394 |
++ return siphash_4u32((__force u32)saddr, (__force u32)daddr, |
395 |
++ (__force u16)dport, |
396 |
++ jiffies / EPHEMERAL_PORT_SHUFFLE_PERIOD, |
397 |
++ &net_secret); |
398 |
+ } |
399 |
+ EXPORT_SYMBOL_GPL(secure_ipv4_port_ephemeral); |
400 |
+ #endif |
401 |
+diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c |
402 |
+index 0dd5ca2004c73..ec725b460ad63 100644 |
403 |
+--- a/net/ipv4/ping.c |
404 |
++++ b/net/ipv4/ping.c |
405 |
+@@ -309,6 +309,7 @@ static int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk, |
406 |
+ struct net *net = sock_net(sk); |
407 |
+ if (sk->sk_family == AF_INET) { |
408 |
+ struct sockaddr_in *addr = (struct sockaddr_in *) uaddr; |
409 |
++ u32 tb_id = RT_TABLE_LOCAL; |
410 |
+ int chk_addr_ret; |
411 |
+ |
412 |
+ if (addr_len < sizeof(*addr)) |
413 |
+@@ -322,7 +323,8 @@ static int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk, |
414 |
+ pr_debug("ping_check_bind_addr(sk=%p,addr=%pI4,port=%d)\n", |
415 |
+ sk, &addr->sin_addr.s_addr, ntohs(addr->sin_port)); |
416 |
+ |
417 |
+- chk_addr_ret = inet_addr_type(net, addr->sin_addr.s_addr); |
418 |
++ tb_id = l3mdev_fib_table_by_index(net, sk->sk_bound_dev_if) ? : tb_id; |
419 |
++ chk_addr_ret = inet_addr_type_table(net, addr->sin_addr.s_addr, tb_id); |
420 |
+ |
421 |
+ if (addr->sin_addr.s_addr == htonl(INADDR_ANY)) |
422 |
+ chk_addr_ret = RTN_LOCAL; |
423 |
+@@ -364,6 +366,14 @@ static int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk, |
424 |
+ return -ENODEV; |
425 |
+ } |
426 |
+ } |
427 |
++ |
428 |
++ if (!dev && sk->sk_bound_dev_if) { |
429 |
++ dev = dev_get_by_index_rcu(net, sk->sk_bound_dev_if); |
430 |
++ if (!dev) { |
431 |
++ rcu_read_unlock(); |
432 |
++ return -ENODEV; |
433 |
++ } |
434 |
++ } |
435 |
+ has_addr = pingv6_ops.ipv6_chk_addr(net, &addr->sin6_addr, dev, |
436 |
+ scoped); |
437 |
+ rcu_read_unlock(); |
438 |
+diff --git a/net/ipv4/route.c b/net/ipv4/route.c |
439 |
+index 34cf572cc5dcd..52c4098e1debf 100644 |
440 |
+--- a/net/ipv4/route.c |
441 |
++++ b/net/ipv4/route.c |
442 |
+@@ -1697,6 +1697,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr, |
443 |
+ #endif |
444 |
+ RT_CACHE_STAT_INC(in_slow_mc); |
445 |
+ |
446 |
++ skb_dst_drop(skb); |
447 |
+ skb_dst_set(skb, &rth->dst); |
448 |
+ return 0; |
449 |
+ } |
450 |
+diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c |
451 |
+index 979cd7dff40ac..1b2e99ce54e57 100644 |
452 |
+--- a/net/netlink/af_netlink.c |
453 |
++++ b/net/netlink/af_netlink.c |
454 |
+@@ -1947,7 +1947,6 @@ static int netlink_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, |
455 |
+ copied = len; |
456 |
+ } |
457 |
+ |
458 |
+- skb_reset_transport_header(data_skb); |
459 |
+ err = skb_copy_datagram_msg(data_skb, 0, msg, copied); |
460 |
+ |
461 |
+ if (msg->msg_name) { |
462 |
+diff --git a/net/smc/smc_rx.c b/net/smc/smc_rx.c |
463 |
+index cbf58637ee146..0d5146d6d105e 100644 |
464 |
+--- a/net/smc/smc_rx.c |
465 |
++++ b/net/smc/smc_rx.c |
466 |
+@@ -145,12 +145,12 @@ int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg, size_t len, |
467 |
+ } |
468 |
+ break; |
469 |
+ } |
470 |
++ if (!timeo) |
471 |
++ return -EAGAIN; |
472 |
+ if (signal_pending(current)) { |
473 |
+ read_done = sock_intr_errno(timeo); |
474 |
+ break; |
475 |
+ } |
476 |
+- if (!timeo) |
477 |
+- return -EAGAIN; |
478 |
+ } |
479 |
+ |
480 |
+ if (!atomic_read(&conn->bytes_to_rcv)) { |
481 |
+diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c |
482 |
+index 3fe09828745aa..362d1fb2aae94 100644 |
483 |
+--- a/sound/soc/codecs/max98090.c |
484 |
++++ b/sound/soc/codecs/max98090.c |
485 |
+@@ -419,6 +419,9 @@ static int max98090_put_enab_tlv(struct snd_kcontrol *kcontrol, |
486 |
+ |
487 |
+ val = (val >> mc->shift) & mask; |
488 |
+ |
489 |
++ if (sel < 0 || sel > mc->max) |
490 |
++ return -EINVAL; |
491 |
++ |
492 |
+ *select = sel; |
493 |
+ |
494 |
+ /* Setting a volume is only valid if it is already On */ |
495 |
+@@ -433,7 +436,7 @@ static int max98090_put_enab_tlv(struct snd_kcontrol *kcontrol, |
496 |
+ mask << mc->shift, |
497 |
+ sel << mc->shift); |
498 |
+ |
499 |
+- return 0; |
500 |
++ return *select != val; |
501 |
+ } |
502 |
+ |
503 |
+ static const char *max98090_perf_pwr_text[] = |
504 |
+diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c |
505 |
+index d6d72595fbd0d..0848aec1bd245 100644 |
506 |
+--- a/sound/soc/soc-ops.c |
507 |
++++ b/sound/soc/soc-ops.c |
508 |
+@@ -528,7 +528,15 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, |
509 |
+ unsigned int mask = (1 << fls(max)) - 1; |
510 |
+ unsigned int invert = mc->invert; |
511 |
+ unsigned int val, val_mask; |
512 |
+- int err, ret; |
513 |
++ int err, ret, tmp; |
514 |
++ |
515 |
++ tmp = ucontrol->value.integer.value[0]; |
516 |
++ if (tmp < 0) |
517 |
++ return -EINVAL; |
518 |
++ if (mc->platform_max && tmp > mc->platform_max) |
519 |
++ return -EINVAL; |
520 |
++ if (tmp > mc->max - mc->min + 1) |
521 |
++ return -EINVAL; |
522 |
+ |
523 |
+ if (invert) |
524 |
+ val = (max - ucontrol->value.integer.value[0]) & mask; |
525 |
+@@ -543,6 +551,14 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, |
526 |
+ ret = err; |
527 |
+ |
528 |
+ if (snd_soc_volsw_is_stereo(mc)) { |
529 |
++ tmp = ucontrol->value.integer.value[1]; |
530 |
++ if (tmp < 0) |
531 |
++ return -EINVAL; |
532 |
++ if (mc->platform_max && tmp > mc->platform_max) |
533 |
++ return -EINVAL; |
534 |
++ if (tmp > mc->max - mc->min + 1) |
535 |
++ return -EINVAL; |
536 |
++ |
537 |
+ if (invert) |
538 |
+ val = (max - ucontrol->value.integer.value[1]) & mask; |
539 |
+ else |