1 |
commit: c6e05b2793c19bd3b40abc6f94a2338d992d9ce8 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 20 13:25:55 2021 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 20 13:25:55 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=c6e05b27 |
7 |
|
8 |
Linuxpatch 4.19.213 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1212_linux-4.19.213.patch | 953 ++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 957 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 45a3155..8b39e90 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -887,6 +887,10 @@ Patch: 1211_linux-4.19.212.patch |
21 |
From: https://www.kernel.org |
22 |
Desc: Linux 4.19.212 |
23 |
|
24 |
+Patch: 1212_linux-4.19.213.patch |
25 |
+From: https://www.kernel.org |
26 |
+Desc: Linux 4.19.213 |
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/1212_linux-4.19.213.patch b/1212_linux-4.19.213.patch |
33 |
new file mode 100644 |
34 |
index 0000000..0c739c9 |
35 |
--- /dev/null |
36 |
+++ b/1212_linux-4.19.213.patch |
37 |
@@ -0,0 +1,953 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index 484b0665e5721..ac86ad939880e 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 4 |
45 |
+ PATCHLEVEL = 19 |
46 |
+-SUBLEVEL = 212 |
47 |
++SUBLEVEL = 213 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = "People's Front" |
50 |
+ |
51 |
+diff --git a/arch/s390/lib/string.c b/arch/s390/lib/string.c |
52 |
+index a10e11f7a5f79..c1832eba50ea7 100644 |
53 |
+--- a/arch/s390/lib/string.c |
54 |
++++ b/arch/s390/lib/string.c |
55 |
+@@ -227,14 +227,13 @@ EXPORT_SYMBOL(strcmp); |
56 |
+ */ |
57 |
+ char *strrchr(const char *s, int c) |
58 |
+ { |
59 |
+- size_t len = __strend(s) - s; |
60 |
+- |
61 |
+- if (len) |
62 |
+- do { |
63 |
+- if (s[len] == (char) c) |
64 |
+- return (char *) s + len; |
65 |
+- } while (--len > 0); |
66 |
+- return NULL; |
67 |
++ ssize_t len = __strend(s) - s; |
68 |
++ |
69 |
++ do { |
70 |
++ if (s[len] == (char)c) |
71 |
++ return (char *)s + len; |
72 |
++ } while (--len >= 0); |
73 |
++ return NULL; |
74 |
+ } |
75 |
+ EXPORT_SYMBOL(strrchr); |
76 |
+ |
77 |
+diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig |
78 |
+index 3dd2949b2b356..6348b0964e9cb 100644 |
79 |
+--- a/arch/x86/Kconfig |
80 |
++++ b/arch/x86/Kconfig |
81 |
+@@ -1496,7 +1496,6 @@ config AMD_MEM_ENCRYPT |
82 |
+ |
83 |
+ config AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT |
84 |
+ bool "Activate AMD Secure Memory Encryption (SME) by default" |
85 |
+- default y |
86 |
+ depends on AMD_MEM_ENCRYPT |
87 |
+ ---help--- |
88 |
+ Say yes to have system memory encrypted by default if running on |
89 |
+diff --git a/arch/x86/kernel/cpu/intel_rdt.c b/arch/x86/kernel/cpu/intel_rdt.c |
90 |
+index b32fa6bcf811f..d4993d42b7411 100644 |
91 |
+--- a/arch/x86/kernel/cpu/intel_rdt.c |
92 |
++++ b/arch/x86/kernel/cpu/intel_rdt.c |
93 |
+@@ -563,6 +563,8 @@ static void domain_add_cpu(int cpu, struct rdt_resource *r) |
94 |
+ } |
95 |
+ |
96 |
+ if (r->mon_capable && domain_setup_mon_state(r, d)) { |
97 |
++ kfree(d->ctrl_val); |
98 |
++ kfree(d->mbps_val); |
99 |
+ kfree(d); |
100 |
+ return; |
101 |
+ } |
102 |
+diff --git a/drivers/acpi/arm64/gtdt.c b/drivers/acpi/arm64/gtdt.c |
103 |
+index c39b36c558d6f..7a181a8a9bf04 100644 |
104 |
+--- a/drivers/acpi/arm64/gtdt.c |
105 |
++++ b/drivers/acpi/arm64/gtdt.c |
106 |
+@@ -39,7 +39,7 @@ struct acpi_gtdt_descriptor { |
107 |
+ |
108 |
+ static struct acpi_gtdt_descriptor acpi_gtdt_desc __initdata; |
109 |
+ |
110 |
+-static inline void *next_platform_timer(void *platform_timer) |
111 |
++static inline __init void *next_platform_timer(void *platform_timer) |
112 |
+ { |
113 |
+ struct acpi_gtdt_header *gh = platform_timer; |
114 |
+ |
115 |
+diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c |
116 |
+index 8ea4b8431fc82..52cea1b3ea706 100644 |
117 |
+--- a/drivers/ata/pata_legacy.c |
118 |
++++ b/drivers/ata/pata_legacy.c |
119 |
+@@ -329,7 +329,8 @@ static unsigned int pdc_data_xfer_vlb(struct ata_queued_cmd *qc, |
120 |
+ iowrite32_rep(ap->ioaddr.data_addr, buf, buflen >> 2); |
121 |
+ |
122 |
+ if (unlikely(slop)) { |
123 |
+- __le32 pad; |
124 |
++ __le32 pad = 0; |
125 |
++ |
126 |
+ if (rw == READ) { |
127 |
+ pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr)); |
128 |
+ memcpy(buf + buflen - slop, &pad, slop); |
129 |
+@@ -719,7 +720,8 @@ static unsigned int vlb32_data_xfer(struct ata_queued_cmd *qc, |
130 |
+ ioread32_rep(ap->ioaddr.data_addr, buf, buflen >> 2); |
131 |
+ |
132 |
+ if (unlikely(slop)) { |
133 |
+- __le32 pad; |
134 |
++ __le32 pad = 0; |
135 |
++ |
136 |
+ if (rw == WRITE) { |
137 |
+ memcpy(&pad, buf + buflen - slop, slop); |
138 |
+ iowrite32(le32_to_cpu(pad), ap->ioaddr.data_addr); |
139 |
+diff --git a/drivers/firmware/efi/cper.c b/drivers/firmware/efi/cper.c |
140 |
+index 97da083afd324..aa4abf1a94a13 100644 |
141 |
+--- a/drivers/firmware/efi/cper.c |
142 |
++++ b/drivers/firmware/efi/cper.c |
143 |
+@@ -37,8 +37,6 @@ |
144 |
+ #include <acpi/ghes.h> |
145 |
+ #include <ras/ras_event.h> |
146 |
+ |
147 |
+-static char rcd_decode_str[CPER_REC_LEN]; |
148 |
+- |
149 |
+ /* |
150 |
+ * CPER record ID need to be unique even after reboot, because record |
151 |
+ * ID is used as index for ERST storage, while CPER records from |
152 |
+@@ -311,6 +309,7 @@ const char *cper_mem_err_unpack(struct trace_seq *p, |
153 |
+ struct cper_mem_err_compact *cmem) |
154 |
+ { |
155 |
+ const char *ret = trace_seq_buffer_ptr(p); |
156 |
++ char rcd_decode_str[CPER_REC_LEN]; |
157 |
+ |
158 |
+ if (cper_mem_err_location(cmem, rcd_decode_str)) |
159 |
+ trace_seq_printf(p, "%s", rcd_decode_str); |
160 |
+@@ -325,6 +324,7 @@ static void cper_print_mem(const char *pfx, const struct cper_sec_mem_err *mem, |
161 |
+ int len) |
162 |
+ { |
163 |
+ struct cper_mem_err_compact cmem; |
164 |
++ char rcd_decode_str[CPER_REC_LEN]; |
165 |
+ |
166 |
+ /* Don't trust UEFI 2.1/2.2 structure with bad validation bits */ |
167 |
+ if (len == sizeof(struct cper_sec_mem_err_old) && |
168 |
+diff --git a/drivers/firmware/efi/runtime-wrappers.c b/drivers/firmware/efi/runtime-wrappers.c |
169 |
+index b31e3d3729a6d..0a4309fe01b6b 100644 |
170 |
+--- a/drivers/firmware/efi/runtime-wrappers.c |
171 |
++++ b/drivers/firmware/efi/runtime-wrappers.c |
172 |
+@@ -395,7 +395,7 @@ static void virt_efi_reset_system(int reset_type, |
173 |
+ unsigned long data_size, |
174 |
+ efi_char16_t *data) |
175 |
+ { |
176 |
+- if (down_interruptible(&efi_runtime_lock)) { |
177 |
++ if (down_trylock(&efi_runtime_lock)) { |
178 |
+ pr_warn("failed to invoke the reset_system() runtime service:\n" |
179 |
+ "could not get exclusive access to the firmware\n"); |
180 |
+ return; |
181 |
+diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c |
182 |
+index 822cef472a7e9..5cf6eac9c1d3b 100644 |
183 |
+--- a/drivers/gpu/drm/msm/dsi/dsi.c |
184 |
++++ b/drivers/gpu/drm/msm/dsi/dsi.c |
185 |
+@@ -208,8 +208,10 @@ int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev, |
186 |
+ goto fail; |
187 |
+ } |
188 |
+ |
189 |
+- if (!msm_dsi_manager_validate_current_config(msm_dsi->id)) |
190 |
++ if (!msm_dsi_manager_validate_current_config(msm_dsi->id)) { |
191 |
++ ret = -EINVAL; |
192 |
+ goto fail; |
193 |
++ } |
194 |
+ |
195 |
+ msm_dsi->encoder = encoder; |
196 |
+ |
197 |
+diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c |
198 |
+index 3b78bca0bb4d4..77dae147caf90 100644 |
199 |
+--- a/drivers/gpu/drm/msm/dsi/dsi_host.c |
200 |
++++ b/drivers/gpu/drm/msm/dsi/dsi_host.c |
201 |
+@@ -468,7 +468,7 @@ static int dsi_bus_clk_enable(struct msm_dsi_host *msm_host) |
202 |
+ |
203 |
+ return 0; |
204 |
+ err: |
205 |
+- for (; i > 0; i--) |
206 |
++ while (--i >= 0) |
207 |
+ clk_disable_unprepare(msm_host->bus_clks[i]); |
208 |
+ |
209 |
+ return ret; |
210 |
+diff --git a/drivers/gpu/drm/msm/edp/edp_ctrl.c b/drivers/gpu/drm/msm/edp/edp_ctrl.c |
211 |
+index 7c72264101ff4..2589b23c41318 100644 |
212 |
+--- a/drivers/gpu/drm/msm/edp/edp_ctrl.c |
213 |
++++ b/drivers/gpu/drm/msm/edp/edp_ctrl.c |
214 |
+@@ -1090,7 +1090,7 @@ void msm_edp_ctrl_power(struct edp_ctrl *ctrl, bool on) |
215 |
+ int msm_edp_ctrl_init(struct msm_edp *edp) |
216 |
+ { |
217 |
+ struct edp_ctrl *ctrl = NULL; |
218 |
+- struct device *dev = &edp->pdev->dev; |
219 |
++ struct device *dev; |
220 |
+ int ret; |
221 |
+ |
222 |
+ if (!edp) { |
223 |
+@@ -1098,6 +1098,7 @@ int msm_edp_ctrl_init(struct msm_edp *edp) |
224 |
+ return -EINVAL; |
225 |
+ } |
226 |
+ |
227 |
++ dev = &edp->pdev->dev; |
228 |
+ ctrl = devm_kzalloc(dev, sizeof(*ctrl), GFP_KERNEL); |
229 |
+ if (!ctrl) |
230 |
+ return -ENOMEM; |
231 |
+diff --git a/drivers/iio/adc/aspeed_adc.c b/drivers/iio/adc/aspeed_adc.c |
232 |
+index 9515ca165dfdb..a8e6046d39483 100644 |
233 |
+--- a/drivers/iio/adc/aspeed_adc.c |
234 |
++++ b/drivers/iio/adc/aspeed_adc.c |
235 |
+@@ -188,6 +188,7 @@ static int aspeed_adc_probe(struct platform_device *pdev) |
236 |
+ |
237 |
+ data = iio_priv(indio_dev); |
238 |
+ data->dev = &pdev->dev; |
239 |
++ platform_set_drvdata(pdev, indio_dev); |
240 |
+ |
241 |
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
242 |
+ data->base = devm_ioremap_resource(&pdev->dev, res); |
243 |
+diff --git a/drivers/iio/adc/ti-adc128s052.c b/drivers/iio/adc/ti-adc128s052.c |
244 |
+index 7cf39b3e2416d..9986fc81b7371 100644 |
245 |
+--- a/drivers/iio/adc/ti-adc128s052.c |
246 |
++++ b/drivers/iio/adc/ti-adc128s052.c |
247 |
+@@ -168,7 +168,13 @@ static int adc128_probe(struct spi_device *spi) |
248 |
+ mutex_init(&adc->lock); |
249 |
+ |
250 |
+ ret = iio_device_register(indio_dev); |
251 |
++ if (ret) |
252 |
++ goto err_disable_regulator; |
253 |
+ |
254 |
++ return 0; |
255 |
++ |
256 |
++err_disable_regulator: |
257 |
++ regulator_disable(adc->reg); |
258 |
+ return ret; |
259 |
+ } |
260 |
+ |
261 |
+diff --git a/drivers/iio/common/ssp_sensors/ssp_spi.c b/drivers/iio/common/ssp_sensors/ssp_spi.c |
262 |
+index 2ab106bb3e032..3d11cfa03a31b 100644 |
263 |
+--- a/drivers/iio/common/ssp_sensors/ssp_spi.c |
264 |
++++ b/drivers/iio/common/ssp_sensors/ssp_spi.c |
265 |
+@@ -147,7 +147,7 @@ static int ssp_print_mcu_debug(char *data_frame, int *data_index, |
266 |
+ if (length > received_len - *data_index || length <= 0) { |
267 |
+ ssp_dbg("[SSP]: MSG From MCU-invalid debug length(%d/%d)\n", |
268 |
+ length, received_len); |
269 |
+- return length ? length : -EPROTO; |
270 |
++ return -EPROTO; |
271 |
+ } |
272 |
+ |
273 |
+ ssp_dbg("[SSP]: MSG From MCU - %s\n", &data_frame[*data_index]); |
274 |
+@@ -283,6 +283,8 @@ static int ssp_parse_dataframe(struct ssp_data *data, char *dataframe, int len) |
275 |
+ for (idx = 0; idx < len;) { |
276 |
+ switch (dataframe[idx++]) { |
277 |
+ case SSP_MSG2AP_INST_BYPASS_DATA: |
278 |
++ if (idx >= len) |
279 |
++ return -EPROTO; |
280 |
+ sd = dataframe[idx++]; |
281 |
+ if (sd < 0 || sd >= SSP_SENSOR_MAX) { |
282 |
+ dev_err(SSP_DEV, |
283 |
+@@ -292,10 +294,13 @@ static int ssp_parse_dataframe(struct ssp_data *data, char *dataframe, int len) |
284 |
+ |
285 |
+ if (indio_devs[sd]) { |
286 |
+ spd = iio_priv(indio_devs[sd]); |
287 |
+- if (spd->process_data) |
288 |
++ if (spd->process_data) { |
289 |
++ if (idx >= len) |
290 |
++ return -EPROTO; |
291 |
+ spd->process_data(indio_devs[sd], |
292 |
+ &dataframe[idx], |
293 |
+ data->timestamp); |
294 |
++ } |
295 |
+ } else { |
296 |
+ dev_err(SSP_DEV, "no client for frame\n"); |
297 |
+ } |
298 |
+@@ -303,6 +308,8 @@ static int ssp_parse_dataframe(struct ssp_data *data, char *dataframe, int len) |
299 |
+ idx += ssp_offset_map[sd]; |
300 |
+ break; |
301 |
+ case SSP_MSG2AP_INST_DEBUG_DATA: |
302 |
++ if (idx >= len) |
303 |
++ return -EPROTO; |
304 |
+ sd = ssp_print_mcu_debug(dataframe, &idx, len); |
305 |
+ if (sd) { |
306 |
+ dev_err(SSP_DEV, |
307 |
+diff --git a/drivers/iio/dac/ti-dac5571.c b/drivers/iio/dac/ti-dac5571.c |
308 |
+index e39d1e901353b..2ed927b582f4d 100644 |
309 |
+--- a/drivers/iio/dac/ti-dac5571.c |
310 |
++++ b/drivers/iio/dac/ti-dac5571.c |
311 |
+@@ -355,6 +355,7 @@ static int dac5571_probe(struct i2c_client *client, |
312 |
+ data->dac5571_pwrdwn = dac5571_pwrdwn_quad; |
313 |
+ break; |
314 |
+ default: |
315 |
++ ret = -EINVAL; |
316 |
+ goto err; |
317 |
+ } |
318 |
+ |
319 |
+diff --git a/drivers/iio/light/opt3001.c b/drivers/iio/light/opt3001.c |
320 |
+index f9d13e4ec1083..162eff78c6739 100644 |
321 |
+--- a/drivers/iio/light/opt3001.c |
322 |
++++ b/drivers/iio/light/opt3001.c |
323 |
+@@ -283,6 +283,8 @@ static int opt3001_get_lux(struct opt3001 *opt, int *val, int *val2) |
324 |
+ ret = wait_event_timeout(opt->result_ready_queue, |
325 |
+ opt->result_ready, |
326 |
+ msecs_to_jiffies(OPT3001_RESULT_READY_LONG)); |
327 |
++ if (ret == 0) |
328 |
++ return -ETIMEDOUT; |
329 |
+ } else { |
330 |
+ /* Sleep for result ready time */ |
331 |
+ timeout = (opt->int_time == OPT3001_INT_TIME_SHORT) ? |
332 |
+@@ -319,9 +321,7 @@ err: |
333 |
+ /* Disallow IRQ to access the device while lock is active */ |
334 |
+ opt->ok_to_ignore_lock = false; |
335 |
+ |
336 |
+- if (ret == 0) |
337 |
+- return -ETIMEDOUT; |
338 |
+- else if (ret < 0) |
339 |
++ if (ret < 0) |
340 |
+ return ret; |
341 |
+ |
342 |
+ if (opt->use_irq) { |
343 |
+diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c |
344 |
+index eacb8af8b4fc0..4423db71eda73 100644 |
345 |
+--- a/drivers/input/joystick/xpad.c |
346 |
++++ b/drivers/input/joystick/xpad.c |
347 |
+@@ -345,6 +345,7 @@ static const struct xpad_device { |
348 |
+ { 0x24c6, 0x5b03, "Thrustmaster Ferrari 458 Racing Wheel", 0, XTYPE_XBOX360 }, |
349 |
+ { 0x24c6, 0x5d04, "Razer Sabertooth", 0, XTYPE_XBOX360 }, |
350 |
+ { 0x24c6, 0xfafe, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 }, |
351 |
++ { 0x3285, 0x0607, "Nacon GC-100", 0, XTYPE_XBOX360 }, |
352 |
+ { 0x3767, 0x0101, "Fanatec Speedster 3 Forceshock Wheel", 0, XTYPE_XBOX }, |
353 |
+ { 0xffff, 0xffff, "Chinese-made Xbox Controller", 0, XTYPE_XBOX }, |
354 |
+ { 0x0000, 0x0000, "Generic X-Box pad", 0, XTYPE_UNKNOWN } |
355 |
+@@ -461,6 +462,7 @@ static const struct usb_device_id xpad_table[] = { |
356 |
+ XPAD_XBOXONE_VENDOR(0x24c6), /* PowerA Controllers */ |
357 |
+ XPAD_XBOXONE_VENDOR(0x2e24), /* Hyperkin Duke X-Box One pad */ |
358 |
+ XPAD_XBOX360_VENDOR(0x2f24), /* GameSir Controllers */ |
359 |
++ XPAD_XBOX360_VENDOR(0x3285), /* Nacon GC-100 */ |
360 |
+ { } |
361 |
+ }; |
362 |
+ |
363 |
+diff --git a/drivers/misc/cb710/sgbuf2.c b/drivers/misc/cb710/sgbuf2.c |
364 |
+index 2a40d0efdff5d..4d2a72a537d42 100644 |
365 |
+--- a/drivers/misc/cb710/sgbuf2.c |
366 |
++++ b/drivers/misc/cb710/sgbuf2.c |
367 |
+@@ -50,7 +50,7 @@ static inline bool needs_unaligned_copy(const void *ptr) |
368 |
+ #ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS |
369 |
+ return false; |
370 |
+ #else |
371 |
+- return ((ptr - NULL) & 3) != 0; |
372 |
++ return ((uintptr_t)ptr & 3) != 0; |
373 |
+ #endif |
374 |
+ } |
375 |
+ |
376 |
+diff --git a/drivers/misc/mei/hw-me-regs.h b/drivers/misc/mei/hw-me-regs.h |
377 |
+index 2ac1dc5104b7a..6bbc78698b77b 100644 |
378 |
+--- a/drivers/misc/mei/hw-me-regs.h |
379 |
++++ b/drivers/misc/mei/hw-me-regs.h |
380 |
+@@ -150,6 +150,7 @@ |
381 |
+ #define MEI_DEV_ID_CDF 0x18D3 /* Cedar Fork */ |
382 |
+ |
383 |
+ #define MEI_DEV_ID_ICP_LP 0x34E0 /* Ice Lake Point LP */ |
384 |
++#define MEI_DEV_ID_ICP_N 0x38E0 /* Ice Lake Point N */ |
385 |
+ |
386 |
+ #define MEI_DEV_ID_TGP_LP 0xA0E0 /* Tiger Lake Point LP */ |
387 |
+ |
388 |
+diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c |
389 |
+index b4bf12f27caf5..35086f67d2096 100644 |
390 |
+--- a/drivers/misc/mei/pci-me.c |
391 |
++++ b/drivers/misc/mei/pci-me.c |
392 |
+@@ -112,6 +112,7 @@ static const struct pci_device_id mei_me_pci_tbl[] = { |
393 |
+ {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_H_3, MEI_ME_PCH8_CFG)}, |
394 |
+ |
395 |
+ {MEI_PCI_DEVICE(MEI_DEV_ID_ICP_LP, MEI_ME_PCH12_CFG)}, |
396 |
++ {MEI_PCI_DEVICE(MEI_DEV_ID_ICP_N, MEI_ME_PCH12_CFG)}, |
397 |
+ |
398 |
+ {MEI_PCI_DEVICE(MEI_DEV_ID_TGP_LP, MEI_ME_PCH12_CFG)}, |
399 |
+ |
400 |
+diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig |
401 |
+index 6fde68aa13a40..02644283377a8 100644 |
402 |
+--- a/drivers/net/ethernet/Kconfig |
403 |
++++ b/drivers/net/ethernet/Kconfig |
404 |
+@@ -98,6 +98,7 @@ config JME |
405 |
+ config KORINA |
406 |
+ tristate "Korina (IDT RC32434) Ethernet support" |
407 |
+ depends on MIKROTIK_RB532 |
408 |
++ select CRC32 |
409 |
+ ---help--- |
410 |
+ If you have a Mikrotik RouterBoard 500 or IDT RC32434 |
411 |
+ based system say Y. Otherwise say N. |
412 |
+diff --git a/drivers/net/ethernet/arc/Kconfig b/drivers/net/ethernet/arc/Kconfig |
413 |
+index 5d0ab8e74b680..55622d41f1baf 100644 |
414 |
+--- a/drivers/net/ethernet/arc/Kconfig |
415 |
++++ b/drivers/net/ethernet/arc/Kconfig |
416 |
+@@ -20,6 +20,7 @@ config ARC_EMAC_CORE |
417 |
+ depends on ARC || ARCH_ROCKCHIP || COMPILE_TEST |
418 |
+ select MII |
419 |
+ select PHYLIB |
420 |
++ select CRC32 |
421 |
+ |
422 |
+ config ARC_EMAC |
423 |
+ tristate "ARC EMAC support" |
424 |
+diff --git a/drivers/net/ethernet/microchip/encx24j600-regmap.c b/drivers/net/ethernet/microchip/encx24j600-regmap.c |
425 |
+index 44bb04d4d21b5..46181559d1f1b 100644 |
426 |
+--- a/drivers/net/ethernet/microchip/encx24j600-regmap.c |
427 |
++++ b/drivers/net/ethernet/microchip/encx24j600-regmap.c |
428 |
+@@ -505,13 +505,19 @@ static struct regmap_bus phymap_encx24j600 = { |
429 |
+ .reg_read = regmap_encx24j600_phy_reg_read, |
430 |
+ }; |
431 |
+ |
432 |
+-void devm_regmap_init_encx24j600(struct device *dev, |
433 |
+- struct encx24j600_context *ctx) |
434 |
++int devm_regmap_init_encx24j600(struct device *dev, |
435 |
++ struct encx24j600_context *ctx) |
436 |
+ { |
437 |
+ mutex_init(&ctx->mutex); |
438 |
+ regcfg.lock_arg = ctx; |
439 |
+ ctx->regmap = devm_regmap_init(dev, ®map_encx24j600, ctx, ®cfg); |
440 |
++ if (IS_ERR(ctx->regmap)) |
441 |
++ return PTR_ERR(ctx->regmap); |
442 |
+ ctx->phymap = devm_regmap_init(dev, &phymap_encx24j600, ctx, &phycfg); |
443 |
++ if (IS_ERR(ctx->phymap)) |
444 |
++ return PTR_ERR(ctx->phymap); |
445 |
++ |
446 |
++ return 0; |
447 |
+ } |
448 |
+ EXPORT_SYMBOL_GPL(devm_regmap_init_encx24j600); |
449 |
+ |
450 |
+diff --git a/drivers/net/ethernet/microchip/encx24j600.c b/drivers/net/ethernet/microchip/encx24j600.c |
451 |
+index 84b6ad76f5bca..ff45326eb696b 100644 |
452 |
+--- a/drivers/net/ethernet/microchip/encx24j600.c |
453 |
++++ b/drivers/net/ethernet/microchip/encx24j600.c |
454 |
+@@ -1032,10 +1032,13 @@ static int encx24j600_spi_probe(struct spi_device *spi) |
455 |
+ priv->speed = SPEED_100; |
456 |
+ |
457 |
+ priv->ctx.spi = spi; |
458 |
+- devm_regmap_init_encx24j600(&spi->dev, &priv->ctx); |
459 |
+ ndev->irq = spi->irq; |
460 |
+ ndev->netdev_ops = &encx24j600_netdev_ops; |
461 |
+ |
462 |
++ ret = devm_regmap_init_encx24j600(&spi->dev, &priv->ctx); |
463 |
++ if (ret) |
464 |
++ goto out_free; |
465 |
++ |
466 |
+ mutex_init(&priv->lock); |
467 |
+ |
468 |
+ /* Reset device and check if it is connected */ |
469 |
+diff --git a/drivers/net/ethernet/microchip/encx24j600_hw.h b/drivers/net/ethernet/microchip/encx24j600_hw.h |
470 |
+index f604a260ede79..711147a159aa9 100644 |
471 |
+--- a/drivers/net/ethernet/microchip/encx24j600_hw.h |
472 |
++++ b/drivers/net/ethernet/microchip/encx24j600_hw.h |
473 |
+@@ -15,8 +15,8 @@ struct encx24j600_context { |
474 |
+ int bank; |
475 |
+ }; |
476 |
+ |
477 |
+-void devm_regmap_init_encx24j600(struct device *dev, |
478 |
+- struct encx24j600_context *ctx); |
479 |
++int devm_regmap_init_encx24j600(struct device *dev, |
480 |
++ struct encx24j600_context *ctx); |
481 |
+ |
482 |
+ /* Single-byte instructions */ |
483 |
+ #define BANK_SELECT(bank) (0xC0 | ((bank & (BANK_MASK >> BANK_SHIFT)) << 1)) |
484 |
+diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c |
485 |
+index b8983e73265a0..85a54215616c5 100644 |
486 |
+--- a/drivers/net/ethernet/neterion/s2io.c |
487 |
++++ b/drivers/net/ethernet/neterion/s2io.c |
488 |
+@@ -8569,7 +8569,7 @@ static void s2io_io_resume(struct pci_dev *pdev) |
489 |
+ return; |
490 |
+ } |
491 |
+ |
492 |
+- if (s2io_set_mac_addr(netdev, netdev->dev_addr) == FAILURE) { |
493 |
++ if (do_s2io_prog_unicast(netdev, netdev->dev_addr) == FAILURE) { |
494 |
+ s2io_card_down(sp); |
495 |
+ pr_err("Can't restore mac addr after reset.\n"); |
496 |
+ return; |
497 |
+diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c |
498 |
+index 9d77f318d11ed..43c85e584b6fe 100644 |
499 |
+--- a/drivers/net/ethernet/qlogic/qed/qed_main.c |
500 |
++++ b/drivers/net/ethernet/qlogic/qed/qed_main.c |
501 |
+@@ -1067,6 +1067,7 @@ static int qed_slowpath_start(struct qed_dev *cdev, |
502 |
+ } else { |
503 |
+ DP_NOTICE(cdev, |
504 |
+ "Failed to acquire PTT for aRFS\n"); |
505 |
++ rc = -EINVAL; |
506 |
+ goto err; |
507 |
+ } |
508 |
+ } |
509 |
+diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig |
510 |
+index 418b0904cecb9..cc2fd19577656 100644 |
511 |
+--- a/drivers/net/usb/Kconfig |
512 |
++++ b/drivers/net/usb/Kconfig |
513 |
+@@ -98,6 +98,10 @@ config USB_RTL8150 |
514 |
+ config USB_RTL8152 |
515 |
+ tristate "Realtek RTL8152/RTL8153 Based USB Ethernet Adapters" |
516 |
+ select MII |
517 |
++ select CRC32 |
518 |
++ select CRYPTO |
519 |
++ select CRYPTO_HASH |
520 |
++ select CRYPTO_SHA256 |
521 |
+ help |
522 |
+ This option adds support for Realtek RTL8152 based USB 2.0 |
523 |
+ 10/100 Ethernet adapters and RTL8153 based USB 3.0 10/100/1000 |
524 |
+diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c |
525 |
+index 30c040786fde2..2e77d49c2657e 100644 |
526 |
+--- a/drivers/nvmem/core.c |
527 |
++++ b/drivers/nvmem/core.c |
528 |
+@@ -1061,7 +1061,8 @@ static void nvmem_shift_read_buffer_in_place(struct nvmem_cell *cell, void *buf) |
529 |
+ *p-- = 0; |
530 |
+ |
531 |
+ /* clear msb bits if any leftover in the last byte */ |
532 |
+- *p &= GENMASK((cell->nbits%BITS_PER_BYTE) - 1, 0); |
533 |
++ if (cell->nbits % BITS_PER_BYTE) |
534 |
++ *p &= GENMASK((cell->nbits % BITS_PER_BYTE) - 1, 0); |
535 |
+ } |
536 |
+ |
537 |
+ static int __nvmem_cell_read(struct nvmem_device *nvmem, |
538 |
+diff --git a/drivers/platform/mellanox/mlxreg-io.c b/drivers/platform/mellanox/mlxreg-io.c |
539 |
+index acfaf64ffde68..1c3760c13f832 100644 |
540 |
+--- a/drivers/platform/mellanox/mlxreg-io.c |
541 |
++++ b/drivers/platform/mellanox/mlxreg-io.c |
542 |
+@@ -123,7 +123,7 @@ mlxreg_io_attr_store(struct device *dev, struct device_attribute *attr, |
543 |
+ return -EINVAL; |
544 |
+ |
545 |
+ /* Convert buffer to input value. */ |
546 |
+- ret = kstrtou32(buf, len, &input_val); |
547 |
++ ret = kstrtou32(buf, 0, &input_val); |
548 |
+ if (ret) |
549 |
+ return ret; |
550 |
+ |
551 |
+diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c |
552 |
+index 19485c076ba30..d707993ac9215 100644 |
553 |
+--- a/drivers/usb/host/xhci-pci.c |
554 |
++++ b/drivers/usb/host/xhci-pci.c |
555 |
+@@ -28,6 +28,7 @@ |
556 |
+ #define PCI_VENDOR_ID_FRESCO_LOGIC 0x1b73 |
557 |
+ #define PCI_DEVICE_ID_FRESCO_LOGIC_PDK 0x1000 |
558 |
+ #define PCI_DEVICE_ID_FRESCO_LOGIC_FL1009 0x1009 |
559 |
++#define PCI_DEVICE_ID_FRESCO_LOGIC_FL1100 0x1100 |
560 |
+ #define PCI_DEVICE_ID_FRESCO_LOGIC_FL1400 0x1400 |
561 |
+ |
562 |
+ #define PCI_VENDOR_ID_ETRON 0x1b6f |
563 |
+@@ -89,6 +90,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) |
564 |
+ /* Look for vendor-specific quirks */ |
565 |
+ if (pdev->vendor == PCI_VENDOR_ID_FRESCO_LOGIC && |
566 |
+ (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK || |
567 |
++ pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_FL1100 || |
568 |
+ pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_FL1400)) { |
569 |
+ if (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK && |
570 |
+ pdev->revision == 0x0) { |
571 |
+diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c |
572 |
+index 7c981ad34251d..04c04328d075f 100644 |
573 |
+--- a/drivers/usb/host/xhci-ring.c |
574 |
++++ b/drivers/usb/host/xhci-ring.c |
575 |
+@@ -339,16 +339,22 @@ static void xhci_handle_stopped_cmd_ring(struct xhci_hcd *xhci, |
576 |
+ /* Must be called with xhci->lock held, releases and aquires lock back */ |
577 |
+ static int xhci_abort_cmd_ring(struct xhci_hcd *xhci, unsigned long flags) |
578 |
+ { |
579 |
+- u64 temp_64; |
580 |
++ u32 temp_32; |
581 |
+ int ret; |
582 |
+ |
583 |
+ xhci_dbg(xhci, "Abort command ring\n"); |
584 |
+ |
585 |
+ reinit_completion(&xhci->cmd_ring_stop_completion); |
586 |
+ |
587 |
+- temp_64 = xhci_read_64(xhci, &xhci->op_regs->cmd_ring); |
588 |
+- xhci_write_64(xhci, temp_64 | CMD_RING_ABORT, |
589 |
+- &xhci->op_regs->cmd_ring); |
590 |
++ /* |
591 |
++ * The control bits like command stop, abort are located in lower |
592 |
++ * dword of the command ring control register. Limit the write |
593 |
++ * to the lower dword to avoid corrupting the command ring pointer |
594 |
++ * in case if the command ring is stopped by the time upper dword |
595 |
++ * is written. |
596 |
++ */ |
597 |
++ temp_32 = readl(&xhci->op_regs->cmd_ring); |
598 |
++ writel(temp_32 | CMD_RING_ABORT, &xhci->op_regs->cmd_ring); |
599 |
+ |
600 |
+ /* Section 4.6.1.2 of xHCI 1.0 spec says software should also time the |
601 |
+ * completion of the Command Abort operation. If CRR is not negated in 5 |
602 |
+diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c |
603 |
+index bebab0ec29786..c6eec712cc47a 100644 |
604 |
+--- a/drivers/usb/host/xhci.c |
605 |
++++ b/drivers/usb/host/xhci.c |
606 |
+@@ -3093,10 +3093,13 @@ static void xhci_endpoint_reset(struct usb_hcd *hcd, |
607 |
+ ep = &vdev->eps[ep_index]; |
608 |
+ |
609 |
+ /* Bail out if toggle is already being cleared by a endpoint reset */ |
610 |
++ spin_lock_irqsave(&xhci->lock, flags); |
611 |
+ if (ep->ep_state & EP_HARD_CLEAR_TOGGLE) { |
612 |
+ ep->ep_state &= ~EP_HARD_CLEAR_TOGGLE; |
613 |
++ spin_unlock_irqrestore(&xhci->lock, flags); |
614 |
+ return; |
615 |
+ } |
616 |
++ spin_unlock_irqrestore(&xhci->lock, flags); |
617 |
+ /* Only interrupt and bulk ep's use data toggle, USB2 spec 5.5.4-> */ |
618 |
+ if (usb_endpoint_xfer_control(&host_ep->desc) || |
619 |
+ usb_endpoint_xfer_isoc(&host_ep->desc)) |
620 |
+@@ -3182,8 +3185,10 @@ static void xhci_endpoint_reset(struct usb_hcd *hcd, |
621 |
+ xhci_free_command(xhci, cfg_cmd); |
622 |
+ cleanup: |
623 |
+ xhci_free_command(xhci, stop_cmd); |
624 |
++ spin_lock_irqsave(&xhci->lock, flags); |
625 |
+ if (ep->ep_state & EP_SOFT_CLEAR_TOGGLE) |
626 |
+ ep->ep_state &= ~EP_SOFT_CLEAR_TOGGLE; |
627 |
++ spin_unlock_irqrestore(&xhci->lock, flags); |
628 |
+ } |
629 |
+ |
630 |
+ static int xhci_check_streams_endpoint(struct xhci_hcd *xhci, |
631 |
+diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c |
632 |
+index 2f6708b8b5c2f..892d745078900 100644 |
633 |
+--- a/drivers/usb/musb/musb_dsps.c |
634 |
++++ b/drivers/usb/musb/musb_dsps.c |
635 |
+@@ -901,11 +901,13 @@ static int dsps_probe(struct platform_device *pdev) |
636 |
+ if (usb_get_dr_mode(&pdev->dev) == USB_DR_MODE_PERIPHERAL) { |
637 |
+ ret = dsps_setup_optional_vbus_irq(pdev, glue); |
638 |
+ if (ret) |
639 |
+- goto err; |
640 |
++ goto unregister_pdev; |
641 |
+ } |
642 |
+ |
643 |
+ return 0; |
644 |
+ |
645 |
++unregister_pdev: |
646 |
++ platform_device_unregister(glue->musb); |
647 |
+ err: |
648 |
+ pm_runtime_disable(&pdev->dev); |
649 |
+ iounmap(glue->usbss_base); |
650 |
+diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c |
651 |
+index 524b3c6e96e2a..eaf118ee2a865 100644 |
652 |
+--- a/drivers/usb/serial/option.c |
653 |
++++ b/drivers/usb/serial/option.c |
654 |
+@@ -246,11 +246,13 @@ static void option_instat_callback(struct urb *urb); |
655 |
+ /* These Quectel products use Quectel's vendor ID */ |
656 |
+ #define QUECTEL_PRODUCT_EC21 0x0121 |
657 |
+ #define QUECTEL_PRODUCT_EC25 0x0125 |
658 |
++#define QUECTEL_PRODUCT_EG91 0x0191 |
659 |
+ #define QUECTEL_PRODUCT_EG95 0x0195 |
660 |
+ #define QUECTEL_PRODUCT_BG96 0x0296 |
661 |
+ #define QUECTEL_PRODUCT_EP06 0x0306 |
662 |
+ #define QUECTEL_PRODUCT_EM12 0x0512 |
663 |
+ #define QUECTEL_PRODUCT_RM500Q 0x0800 |
664 |
++#define QUECTEL_PRODUCT_EC200S_CN 0x6002 |
665 |
+ #define QUECTEL_PRODUCT_EC200T 0x6026 |
666 |
+ |
667 |
+ #define CMOTECH_VENDOR_ID 0x16d8 |
668 |
+@@ -1111,6 +1113,9 @@ static const struct usb_device_id option_ids[] = { |
669 |
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC25, 0xff, 0xff, 0xff), |
670 |
+ .driver_info = NUMEP2 }, |
671 |
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC25, 0xff, 0, 0) }, |
672 |
++ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG91, 0xff, 0xff, 0xff), |
673 |
++ .driver_info = NUMEP2 }, |
674 |
++ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG91, 0xff, 0, 0) }, |
675 |
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95, 0xff, 0xff, 0xff), |
676 |
+ .driver_info = NUMEP2 }, |
677 |
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95, 0xff, 0, 0) }, |
678 |
+@@ -1128,6 +1133,7 @@ static const struct usb_device_id option_ids[] = { |
679 |
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0, 0) }, |
680 |
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x10), |
681 |
+ .driver_info = ZLP }, |
682 |
++ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) }, |
683 |
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) }, |
684 |
+ |
685 |
+ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) }, |
686 |
+@@ -1227,6 +1233,8 @@ static const struct usb_device_id option_ids[] = { |
687 |
+ .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, |
688 |
+ { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1203, 0xff), /* Telit LE910Cx (RNDIS) */ |
689 |
+ .driver_info = NCTRL(2) | RSVD(3) }, |
690 |
++ { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1204, 0xff), /* Telit LE910Cx (MBIM) */ |
691 |
++ .driver_info = NCTRL(0) | RSVD(1) }, |
692 |
+ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910_USBCFG4), |
693 |
+ .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) | RSVD(3) }, |
694 |
+ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920), |
695 |
+diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c |
696 |
+index 0f60363c1bbc8..b1b9923162a04 100644 |
697 |
+--- a/drivers/usb/serial/qcserial.c |
698 |
++++ b/drivers/usb/serial/qcserial.c |
699 |
+@@ -165,6 +165,7 @@ static const struct usb_device_id id_table[] = { |
700 |
+ {DEVICE_SWI(0x1199, 0x907b)}, /* Sierra Wireless EM74xx */ |
701 |
+ {DEVICE_SWI(0x1199, 0x9090)}, /* Sierra Wireless EM7565 QDL */ |
702 |
+ {DEVICE_SWI(0x1199, 0x9091)}, /* Sierra Wireless EM7565 */ |
703 |
++ {DEVICE_SWI(0x1199, 0x90d2)}, /* Sierra Wireless EM9191 QDL */ |
704 |
+ {DEVICE_SWI(0x413c, 0x81a2)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card */ |
705 |
+ {DEVICE_SWI(0x413c, 0x81a3)}, /* Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card */ |
706 |
+ {DEVICE_SWI(0x413c, 0x81a4)}, /* Dell Wireless 5570e HSPA+ (42Mbps) Mobile Broadband Card */ |
707 |
+diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c |
708 |
+index 59e36ef4920f6..74f43ef2fb0f6 100644 |
709 |
+--- a/drivers/virtio/virtio.c |
710 |
++++ b/drivers/virtio/virtio.c |
711 |
+@@ -222,6 +222,17 @@ static int virtio_dev_probe(struct device *_d) |
712 |
+ driver_features_legacy = driver_features; |
713 |
+ } |
714 |
+ |
715 |
++ /* |
716 |
++ * Some devices detect legacy solely via F_VERSION_1. Write |
717 |
++ * F_VERSION_1 to force LE config space accesses before FEATURES_OK for |
718 |
++ * these when needed. |
719 |
++ */ |
720 |
++ if (drv->validate && !virtio_legacy_is_little_endian() |
721 |
++ && device_features & BIT_ULL(VIRTIO_F_VERSION_1)) { |
722 |
++ dev->features = BIT_ULL(VIRTIO_F_VERSION_1); |
723 |
++ dev->config->finalize_features(dev); |
724 |
++ } |
725 |
++ |
726 |
+ if (device_features & (1ULL << VIRTIO_F_VERSION_1)) |
727 |
+ dev->features = driver_features & device_features; |
728 |
+ else |
729 |
+diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c |
730 |
+index 3a7b7e9cb8896..e0fc8c0948461 100644 |
731 |
+--- a/fs/btrfs/tree-log.c |
732 |
++++ b/fs/btrfs/tree-log.c |
733 |
+@@ -1141,7 +1141,10 @@ next: |
734 |
+ /* look for a conflicting sequence number */ |
735 |
+ di = btrfs_lookup_dir_index_item(trans, root, path, btrfs_ino(dir), |
736 |
+ ref_index, name, namelen, 0); |
737 |
+- if (di && !IS_ERR(di)) { |
738 |
++ if (IS_ERR(di)) { |
739 |
++ if (PTR_ERR(di) != -ENOENT) |
740 |
++ return PTR_ERR(di); |
741 |
++ } else if (di) { |
742 |
+ ret = drop_one_dir_item(trans, root, path, dir, di); |
743 |
+ if (ret) |
744 |
+ return ret; |
745 |
+@@ -1151,7 +1154,9 @@ next: |
746 |
+ /* look for a conflicing name */ |
747 |
+ di = btrfs_lookup_dir_item(trans, root, path, btrfs_ino(dir), |
748 |
+ name, namelen, 0); |
749 |
+- if (di && !IS_ERR(di)) { |
750 |
++ if (IS_ERR(di)) { |
751 |
++ return PTR_ERR(di); |
752 |
++ } else if (di) { |
753 |
+ ret = drop_one_dir_item(trans, root, path, dir, di); |
754 |
+ if (ret) |
755 |
+ return ret; |
756 |
+@@ -1866,8 +1871,8 @@ static noinline int replay_one_name(struct btrfs_trans_handle *trans, |
757 |
+ struct btrfs_key log_key; |
758 |
+ struct inode *dir; |
759 |
+ u8 log_type; |
760 |
+- int exists; |
761 |
+- int ret = 0; |
762 |
++ bool exists; |
763 |
++ int ret; |
764 |
+ bool update_size = (key->type == BTRFS_DIR_INDEX_KEY); |
765 |
+ bool name_added = false; |
766 |
+ |
767 |
+@@ -1887,12 +1892,12 @@ static noinline int replay_one_name(struct btrfs_trans_handle *trans, |
768 |
+ name_len); |
769 |
+ |
770 |
+ btrfs_dir_item_key_to_cpu(eb, di, &log_key); |
771 |
+- exists = btrfs_lookup_inode(trans, root, path, &log_key, 0); |
772 |
+- if (exists == 0) |
773 |
+- exists = 1; |
774 |
+- else |
775 |
+- exists = 0; |
776 |
++ ret = btrfs_lookup_inode(trans, root, path, &log_key, 0); |
777 |
+ btrfs_release_path(path); |
778 |
++ if (ret < 0) |
779 |
++ goto out; |
780 |
++ exists = (ret == 0); |
781 |
++ ret = 0; |
782 |
+ |
783 |
+ if (key->type == BTRFS_DIR_ITEM_KEY) { |
784 |
+ dst_di = btrfs_lookup_dir_item(trans, root, path, key->objectid, |
785 |
+@@ -1907,7 +1912,14 @@ static noinline int replay_one_name(struct btrfs_trans_handle *trans, |
786 |
+ ret = -EINVAL; |
787 |
+ goto out; |
788 |
+ } |
789 |
+- if (IS_ERR_OR_NULL(dst_di)) { |
790 |
++ |
791 |
++ if (dst_di == ERR_PTR(-ENOENT)) |
792 |
++ dst_di = NULL; |
793 |
++ |
794 |
++ if (IS_ERR(dst_di)) { |
795 |
++ ret = PTR_ERR(dst_di); |
796 |
++ goto out; |
797 |
++ } else if (!dst_di) { |
798 |
+ /* we need a sequence number to insert, so we only |
799 |
+ * do inserts for the BTRFS_DIR_INDEX_KEY types |
800 |
+ */ |
801 |
+diff --git a/net/nfc/af_nfc.c b/net/nfc/af_nfc.c |
802 |
+index d3e594eb36d0a..adf16ff007cc2 100644 |
803 |
+--- a/net/nfc/af_nfc.c |
804 |
++++ b/net/nfc/af_nfc.c |
805 |
+@@ -72,6 +72,9 @@ int nfc_proto_register(const struct nfc_protocol *nfc_proto) |
806 |
+ proto_tab[nfc_proto->id] = nfc_proto; |
807 |
+ write_unlock(&proto_tab_lock); |
808 |
+ |
809 |
++ if (rc) |
810 |
++ proto_unregister(nfc_proto->proto); |
811 |
++ |
812 |
+ return rc; |
813 |
+ } |
814 |
+ EXPORT_SYMBOL(nfc_proto_register); |
815 |
+diff --git a/net/nfc/digital_core.c b/net/nfc/digital_core.c |
816 |
+index ec0a8998e52dc..d6258638a07a1 100644 |
817 |
+--- a/net/nfc/digital_core.c |
818 |
++++ b/net/nfc/digital_core.c |
819 |
+@@ -286,6 +286,7 @@ int digital_tg_configure_hw(struct nfc_digital_dev *ddev, int type, int param) |
820 |
+ static int digital_tg_listen_mdaa(struct nfc_digital_dev *ddev, u8 rf_tech) |
821 |
+ { |
822 |
+ struct digital_tg_mdaa_params *params; |
823 |
++ int rc; |
824 |
+ |
825 |
+ params = kzalloc(sizeof(*params), GFP_KERNEL); |
826 |
+ if (!params) |
827 |
+@@ -300,8 +301,12 @@ static int digital_tg_listen_mdaa(struct nfc_digital_dev *ddev, u8 rf_tech) |
828 |
+ get_random_bytes(params->nfcid2 + 2, NFC_NFCID2_MAXSIZE - 2); |
829 |
+ params->sc = DIGITAL_SENSF_FELICA_SC; |
830 |
+ |
831 |
+- return digital_send_cmd(ddev, DIGITAL_CMD_TG_LISTEN_MDAA, NULL, params, |
832 |
+- 500, digital_tg_recv_atr_req, NULL); |
833 |
++ rc = digital_send_cmd(ddev, DIGITAL_CMD_TG_LISTEN_MDAA, NULL, params, |
834 |
++ 500, digital_tg_recv_atr_req, NULL); |
835 |
++ if (rc) |
836 |
++ kfree(params); |
837 |
++ |
838 |
++ return rc; |
839 |
+ } |
840 |
+ |
841 |
+ static int digital_tg_listen_md(struct nfc_digital_dev *ddev, u8 rf_tech) |
842 |
+diff --git a/net/nfc/digital_technology.c b/net/nfc/digital_technology.c |
843 |
+index 2021d1d58a75e..c092b02fde8ab 100644 |
844 |
+--- a/net/nfc/digital_technology.c |
845 |
++++ b/net/nfc/digital_technology.c |
846 |
+@@ -474,8 +474,12 @@ static int digital_in_send_sdd_req(struct nfc_digital_dev *ddev, |
847 |
+ skb_put_u8(skb, sel_cmd); |
848 |
+ skb_put_u8(skb, DIGITAL_SDD_REQ_SEL_PAR); |
849 |
+ |
850 |
+- return digital_in_send_cmd(ddev, skb, 30, digital_in_recv_sdd_res, |
851 |
+- target); |
852 |
++ rc = digital_in_send_cmd(ddev, skb, 30, digital_in_recv_sdd_res, |
853 |
++ target); |
854 |
++ if (rc) |
855 |
++ kfree_skb(skb); |
856 |
++ |
857 |
++ return rc; |
858 |
+ } |
859 |
+ |
860 |
+ static void digital_in_recv_sens_res(struct nfc_digital_dev *ddev, void *arg, |
861 |
+diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c |
862 |
+index 008db8d59acef..fcfe41a954733 100644 |
863 |
+--- a/net/sched/sch_mqprio.c |
864 |
++++ b/net/sched/sch_mqprio.c |
865 |
+@@ -531,22 +531,28 @@ static int mqprio_dump_class_stats(struct Qdisc *sch, unsigned long cl, |
866 |
+ for (i = tc.offset; i < tc.offset + tc.count; i++) { |
867 |
+ struct netdev_queue *q = netdev_get_tx_queue(dev, i); |
868 |
+ struct Qdisc *qdisc = rtnl_dereference(q->qdisc); |
869 |
+- struct gnet_stats_basic_cpu __percpu *cpu_bstats = NULL; |
870 |
+- struct gnet_stats_queue __percpu *cpu_qstats = NULL; |
871 |
+ |
872 |
+ spin_lock_bh(qdisc_lock(qdisc)); |
873 |
++ |
874 |
+ if (qdisc_is_percpu_stats(qdisc)) { |
875 |
+- cpu_bstats = qdisc->cpu_bstats; |
876 |
+- cpu_qstats = qdisc->cpu_qstats; |
877 |
++ qlen = qdisc_qlen_sum(qdisc); |
878 |
++ |
879 |
++ __gnet_stats_copy_basic(NULL, &bstats, |
880 |
++ qdisc->cpu_bstats, |
881 |
++ &qdisc->bstats); |
882 |
++ __gnet_stats_copy_queue(&qstats, |
883 |
++ qdisc->cpu_qstats, |
884 |
++ &qdisc->qstats, |
885 |
++ qlen); |
886 |
++ } else { |
887 |
++ qlen += qdisc->q.qlen; |
888 |
++ bstats.bytes += qdisc->bstats.bytes; |
889 |
++ bstats.packets += qdisc->bstats.packets; |
890 |
++ qstats.backlog += qdisc->qstats.backlog; |
891 |
++ qstats.drops += qdisc->qstats.drops; |
892 |
++ qstats.requeues += qdisc->qstats.requeues; |
893 |
++ qstats.overlimits += qdisc->qstats.overlimits; |
894 |
+ } |
895 |
+- |
896 |
+- qlen = qdisc_qlen_sum(qdisc); |
897 |
+- __gnet_stats_copy_basic(NULL, &sch->bstats, |
898 |
+- cpu_bstats, &qdisc->bstats); |
899 |
+- __gnet_stats_copy_queue(&sch->qstats, |
900 |
+- cpu_qstats, |
901 |
+- &qdisc->qstats, |
902 |
+- qlen); |
903 |
+ spin_unlock_bh(qdisc_lock(qdisc)); |
904 |
+ } |
905 |
+ |
906 |
+diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c |
907 |
+index 0789109c2d093..35e1fb708f4a7 100644 |
908 |
+--- a/net/sctp/sm_make_chunk.c |
909 |
++++ b/net/sctp/sm_make_chunk.c |
910 |
+@@ -3673,7 +3673,7 @@ struct sctp_chunk *sctp_make_strreset_req( |
911 |
+ outlen = (sizeof(outreq) + stream_len) * out; |
912 |
+ inlen = (sizeof(inreq) + stream_len) * in; |
913 |
+ |
914 |
+- retval = sctp_make_reconf(asoc, outlen + inlen); |
915 |
++ retval = sctp_make_reconf(asoc, SCTP_PAD4(outlen) + SCTP_PAD4(inlen)); |
916 |
+ if (!retval) |
917 |
+ return NULL; |
918 |
+ |
919 |
+diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl |
920 |
+index 657e69125a462..321c41562b972 100755 |
921 |
+--- a/scripts/recordmcount.pl |
922 |
++++ b/scripts/recordmcount.pl |
923 |
+@@ -222,7 +222,7 @@ if ($arch =~ /(x86(_64)?)|(i386)/) { |
924 |
+ $local_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\S+)"; |
925 |
+ $weak_regex = "^[0-9a-fA-F]+\\s+([wW])\\s+(\\S+)"; |
926 |
+ $section_regex = "Disassembly of section\\s+(\\S+):"; |
927 |
+-$function_regex = "^([0-9a-fA-F]+)\\s+<(.*?)>:"; |
928 |
++$function_regex = "^([0-9a-fA-F]+)\\s+<([^^]*?)>:"; |
929 |
+ $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s(mcount|__fentry__)\$"; |
930 |
+ $section_type = '@progbits'; |
931 |
+ $mcount_adjust = 0; |
932 |
+diff --git a/sound/core/seq_device.c b/sound/core/seq_device.c |
933 |
+index e40a2cba5002a..5d16b20791195 100644 |
934 |
+--- a/sound/core/seq_device.c |
935 |
++++ b/sound/core/seq_device.c |
936 |
+@@ -162,6 +162,8 @@ static int snd_seq_device_dev_free(struct snd_device *device) |
937 |
+ struct snd_seq_device *dev = device->device_data; |
938 |
+ |
939 |
+ cancel_autoload_drivers(); |
940 |
++ if (dev->private_free) |
941 |
++ dev->private_free(dev); |
942 |
+ put_device(&dev->dev); |
943 |
+ return 0; |
944 |
+ } |
945 |
+@@ -189,11 +191,7 @@ static int snd_seq_device_dev_disconnect(struct snd_device *device) |
946 |
+ |
947 |
+ static void snd_seq_dev_release(struct device *dev) |
948 |
+ { |
949 |
+- struct snd_seq_device *sdev = to_seq_dev(dev); |
950 |
+- |
951 |
+- if (sdev->private_free) |
952 |
+- sdev->private_free(sdev); |
953 |
+- kfree(sdev); |
954 |
++ kfree(to_seq_dev(dev)); |
955 |
+ } |
956 |
+ |
957 |
+ /* |
958 |
+diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c |
959 |
+index 42c30fba699fb..650439286208a 100644 |
960 |
+--- a/sound/pci/hda/patch_realtek.c |
961 |
++++ b/sound/pci/hda/patch_realtek.c |
962 |
+@@ -519,6 +519,8 @@ static void alc_shutup_pins(struct hda_codec *codec) |
963 |
+ struct alc_spec *spec = codec->spec; |
964 |
+ |
965 |
+ switch (codec->core.vendor_id) { |
966 |
++ case 0x10ec0236: |
967 |
++ case 0x10ec0256: |
968 |
+ case 0x10ec0283: |
969 |
+ case 0x10ec0286: |
970 |
+ case 0x10ec0288: |
971 |
+@@ -2523,7 +2525,8 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { |
972 |
+ SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
973 |
+ SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
974 |
+ SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
975 |
+- SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
976 |
++ SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170SM", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
977 |
++ SND_PCI_QUIRK(0x1558, 0x7715, "Clevo X170KM-G", ALC1220_FIXUP_CLEVO_PB51ED), |
978 |
+ SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950), |
979 |
+ SND_PCI_QUIRK(0x1558, 0x9506, "Clevo P955HQ", ALC1220_FIXUP_CLEVO_P950), |
980 |
+ SND_PCI_QUIRK(0x1558, 0x950a, "Clevo P955H[PR]", ALC1220_FIXUP_CLEVO_P950), |
981 |
+@@ -3364,7 +3367,8 @@ static void alc256_shutup(struct hda_codec *codec) |
982 |
+ /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly |
983 |
+ * when booting with headset plugged. So skip setting it for the codec alc257 |
984 |
+ */ |
985 |
+- if (codec->core.vendor_id != 0x10ec0257) |
986 |
++ if (spec->codec_variant != ALC269_TYPE_ALC257 && |
987 |
++ spec->codec_variant != ALC269_TYPE_ALC256) |
988 |
+ alc_update_coef_idx(codec, 0x46, 0, 3 << 12); |
989 |
+ |
990 |
+ if (!spec->no_shutup_pins) |