Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:5.6 commit in: /
Date: Mon, 11 May 2020 22:46:36
Message-Id: 1589237172.ca149b605a796e49d6fa6b4c264c93712590bfd5.mpagano@gentoo
1 commit: ca149b605a796e49d6fa6b4c264c93712590bfd5
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 11 22:46:12 2020 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Mon May 11 22:46:12 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ca149b60
7
8 Linux patch 5.6.12
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1011_linux-5.6.12.patch | 1575 +++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 1579 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index 9c9c8b5..dcfb651 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -87,6 +87,10 @@ Patch: 1010_linux-5.6.11.patch
21 From: http://www.kernel.org
22 Desc: Linux 5.6.11
23
24 +Patch: 1011_linux-5.6.12.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 5.6.12
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/1011_linux-5.6.12.patch b/1011_linux-5.6.12.patch
33 new file mode 100644
34 index 0000000..d32b884
35 --- /dev/null
36 +++ b/1011_linux-5.6.12.patch
37 @@ -0,0 +1,1575 @@
38 +diff --git a/Makefile b/Makefile
39 +index 5dedd6f9ad75..97e4c4d9ac95 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,7 +1,7 @@
43 + # SPDX-License-Identifier: GPL-2.0
44 + VERSION = 5
45 + PATCHLEVEL = 6
46 +-SUBLEVEL = 11
47 ++SUBLEVEL = 12
48 + EXTRAVERSION =
49 + NAME = Kleptomaniac Octopus
50 +
51 +diff --git a/arch/x86/kvm/vmx/ops.h b/arch/x86/kvm/vmx/ops.h
52 +index 09b0937d56b1..19717d0a1100 100644
53 +--- a/arch/x86/kvm/vmx/ops.h
54 ++++ b/arch/x86/kvm/vmx/ops.h
55 +@@ -12,6 +12,7 @@
56 +
57 + #define __ex(x) __kvm_handle_fault_on_reboot(x)
58 +
59 ++asmlinkage void vmread_error(unsigned long field, bool fault);
60 + __attribute__((regparm(0))) void vmread_error_trampoline(unsigned long field,
61 + bool fault);
62 + void vmwrite_error(unsigned long field, unsigned long value);
63 +diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
64 +index f4dbdfafafe3..4edc8a3ce40f 100644
65 +--- a/drivers/acpi/sleep.c
66 ++++ b/drivers/acpi/sleep.c
67 +@@ -982,10 +982,7 @@ static int acpi_s2idle_prepare_late(void)
68 +
69 + static void acpi_s2idle_sync(void)
70 + {
71 +- /*
72 +- * The EC driver uses the system workqueue and an additional special
73 +- * one, so those need to be flushed too.
74 +- */
75 ++ /* The EC driver uses special workqueues that need to be flushed. */
76 + acpi_ec_flush_work();
77 + acpi_os_wait_events_complete(); /* synchronize Notify handling */
78 + }
79 +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
80 +index b03b1eb7ba04..1ae174c3d160 100644
81 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
82 ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
83 +@@ -91,7 +91,8 @@ void amdgpu_pm_acpi_event_handler(struct amdgpu_device *adev)
84 + adev->pm.ac_power = true;
85 + else
86 + adev->pm.ac_power = false;
87 +- if (adev->powerplay.pp_funcs->enable_bapm)
88 ++ if (adev->powerplay.pp_funcs &&
89 ++ adev->powerplay.pp_funcs->enable_bapm)
90 + amdgpu_dpm_enable_bapm(adev, adev->pm.ac_power);
91 + mutex_unlock(&adev->pm.mutex);
92 + }
93 +diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c
94 +index 77c14671866c..719597c5d27d 100644
95 +--- a/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c
96 ++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c
97 +@@ -984,6 +984,32 @@ static int init_thermal_controller(
98 + struct pp_hwmgr *hwmgr,
99 + const ATOM_PPLIB_POWERPLAYTABLE *powerplay_table)
100 + {
101 ++ hwmgr->thermal_controller.ucType =
102 ++ powerplay_table->sThermalController.ucType;
103 ++ hwmgr->thermal_controller.ucI2cLine =
104 ++ powerplay_table->sThermalController.ucI2cLine;
105 ++ hwmgr->thermal_controller.ucI2cAddress =
106 ++ powerplay_table->sThermalController.ucI2cAddress;
107 ++
108 ++ hwmgr->thermal_controller.fanInfo.bNoFan =
109 ++ (0 != (powerplay_table->sThermalController.ucFanParameters &
110 ++ ATOM_PP_FANPARAMETERS_NOFAN));
111 ++
112 ++ hwmgr->thermal_controller.fanInfo.ucTachometerPulsesPerRevolution =
113 ++ powerplay_table->sThermalController.ucFanParameters &
114 ++ ATOM_PP_FANPARAMETERS_TACHOMETER_PULSES_PER_REVOLUTION_MASK;
115 ++
116 ++ hwmgr->thermal_controller.fanInfo.ulMinRPM
117 ++ = powerplay_table->sThermalController.ucFanMinRPM * 100UL;
118 ++ hwmgr->thermal_controller.fanInfo.ulMaxRPM
119 ++ = powerplay_table->sThermalController.ucFanMaxRPM * 100UL;
120 ++
121 ++ set_hw_cap(hwmgr,
122 ++ ATOM_PP_THERMALCONTROLLER_NONE != hwmgr->thermal_controller.ucType,
123 ++ PHM_PlatformCaps_ThermalController);
124 ++
125 ++ hwmgr->thermal_controller.use_hw_fan_control = 1;
126 ++
127 + return 0;
128 + }
129 +
130 +diff --git a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c b/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
131 +index f7a1ce37227c..4a52c310058d 100644
132 +--- a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
133 ++++ b/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
134 +@@ -889,12 +889,17 @@ static int renoir_read_sensor(struct smu_context *smu,
135 +
136 + static bool renoir_is_dpm_running(struct smu_context *smu)
137 + {
138 ++ struct amdgpu_device *adev = smu->adev;
139 ++
140 + /*
141 + * Util now, the pmfw hasn't exported the interface of SMU
142 + * feature mask to APU SKU so just force on all the feature
143 + * at early initial stage.
144 + */
145 +- return true;
146 ++ if (adev->in_suspend)
147 ++ return false;
148 ++ else
149 ++ return true;
150 +
151 + }
152 +
153 +diff --git a/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c b/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c
154 +index 526507102c1e..8d32fea84c75 100644
155 +--- a/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c
156 ++++ b/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c
157 +@@ -485,6 +485,9 @@ static int anx6345_get_modes(struct drm_connector *connector)
158 +
159 + num_modes += drm_add_edid_modes(connector, anx6345->edid);
160 +
161 ++ /* Driver currently supports only 6bpc */
162 ++ connector->display_info.bpc = 6;
163 ++
164 + unlock:
165 + if (power_off)
166 + anx6345_poweroff(anx6345);
167 +diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
168 +index 6effe532f820..461eff94d276 100644
169 +--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
170 ++++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
171 +@@ -1636,8 +1636,7 @@ static ssize_t analogix_dpaux_transfer(struct drm_dp_aux *aux,
172 + }
173 +
174 + struct analogix_dp_device *
175 +-analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
176 +- struct analogix_dp_plat_data *plat_data)
177 ++analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
178 + {
179 + struct platform_device *pdev = to_platform_device(dev);
180 + struct analogix_dp_device *dp;
181 +@@ -1740,22 +1739,30 @@ analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
182 + irq_flags, "analogix-dp", dp);
183 + if (ret) {
184 + dev_err(&pdev->dev, "failed to request irq\n");
185 +- goto err_disable_pm_runtime;
186 ++ return ERR_PTR(ret);
187 + }
188 + disable_irq(dp->irq);
189 +
190 ++ return dp;
191 ++}
192 ++EXPORT_SYMBOL_GPL(analogix_dp_probe);
193 ++
194 ++int analogix_dp_bind(struct analogix_dp_device *dp, struct drm_device *drm_dev)
195 ++{
196 ++ int ret;
197 ++
198 + dp->drm_dev = drm_dev;
199 + dp->encoder = dp->plat_data->encoder;
200 +
201 + dp->aux.name = "DP-AUX";
202 + dp->aux.transfer = analogix_dpaux_transfer;
203 +- dp->aux.dev = &pdev->dev;
204 ++ dp->aux.dev = dp->dev;
205 +
206 + ret = drm_dp_aux_register(&dp->aux);
207 + if (ret)
208 +- return ERR_PTR(ret);
209 ++ return ret;
210 +
211 +- pm_runtime_enable(dev);
212 ++ pm_runtime_enable(dp->dev);
213 +
214 + ret = analogix_dp_create_bridge(drm_dev, dp);
215 + if (ret) {
216 +@@ -1763,13 +1770,12 @@ analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
217 + goto err_disable_pm_runtime;
218 + }
219 +
220 +- return dp;
221 ++ return 0;
222 +
223 + err_disable_pm_runtime:
224 ++ pm_runtime_disable(dp->dev);
225 +
226 +- pm_runtime_disable(dev);
227 +-
228 +- return ERR_PTR(ret);
229 ++ return ret;
230 + }
231 + EXPORT_SYMBOL_GPL(analogix_dp_bind);
232 +
233 +@@ -1786,10 +1792,15 @@ void analogix_dp_unbind(struct analogix_dp_device *dp)
234 +
235 + drm_dp_aux_unregister(&dp->aux);
236 + pm_runtime_disable(dp->dev);
237 +- clk_disable_unprepare(dp->clock);
238 + }
239 + EXPORT_SYMBOL_GPL(analogix_dp_unbind);
240 +
241 ++void analogix_dp_remove(struct analogix_dp_device *dp)
242 ++{
243 ++ clk_disable_unprepare(dp->clock);
244 ++}
245 ++EXPORT_SYMBOL_GPL(analogix_dp_remove);
246 ++
247 + #ifdef CONFIG_PM
248 + int analogix_dp_suspend(struct analogix_dp_device *dp)
249 + {
250 +diff --git a/drivers/gpu/drm/exynos/exynos_dp.c b/drivers/gpu/drm/exynos/exynos_dp.c
251 +index 4785885c0f4f..065a1cb2a544 100644
252 +--- a/drivers/gpu/drm/exynos/exynos_dp.c
253 ++++ b/drivers/gpu/drm/exynos/exynos_dp.c
254 +@@ -158,15 +158,8 @@ static int exynos_dp_bind(struct device *dev, struct device *master, void *data)
255 + struct drm_device *drm_dev = data;
256 + int ret;
257 +
258 +- dp->dev = dev;
259 + dp->drm_dev = drm_dev;
260 +
261 +- dp->plat_data.dev_type = EXYNOS_DP;
262 +- dp->plat_data.power_on_start = exynos_dp_poweron;
263 +- dp->plat_data.power_off = exynos_dp_poweroff;
264 +- dp->plat_data.attach = exynos_dp_bridge_attach;
265 +- dp->plat_data.get_modes = exynos_dp_get_modes;
266 +-
267 + if (!dp->plat_data.panel && !dp->ptn_bridge) {
268 + ret = exynos_dp_dt_parse_panel(dp);
269 + if (ret)
270 +@@ -184,13 +177,11 @@ static int exynos_dp_bind(struct device *dev, struct device *master, void *data)
271 +
272 + dp->plat_data.encoder = encoder;
273 +
274 +- dp->adp = analogix_dp_bind(dev, dp->drm_dev, &dp->plat_data);
275 +- if (IS_ERR(dp->adp)) {
276 ++ ret = analogix_dp_bind(dp->adp, dp->drm_dev);
277 ++ if (ret)
278 + dp->encoder.funcs->destroy(&dp->encoder);
279 +- return PTR_ERR(dp->adp);
280 +- }
281 +
282 +- return 0;
283 ++ return ret;
284 + }
285 +
286 + static void exynos_dp_unbind(struct device *dev, struct device *master,
287 +@@ -221,6 +212,7 @@ static int exynos_dp_probe(struct platform_device *pdev)
288 + if (!dp)
289 + return -ENOMEM;
290 +
291 ++ dp->dev = dev;
292 + /*
293 + * We just use the drvdata until driver run into component
294 + * add function, and then we would set drvdata to null, so
295 +@@ -246,16 +238,29 @@ static int exynos_dp_probe(struct platform_device *pdev)
296 +
297 + /* The remote port can be either a panel or a bridge */
298 + dp->plat_data.panel = panel;
299 ++ dp->plat_data.dev_type = EXYNOS_DP;
300 ++ dp->plat_data.power_on_start = exynos_dp_poweron;
301 ++ dp->plat_data.power_off = exynos_dp_poweroff;
302 ++ dp->plat_data.attach = exynos_dp_bridge_attach;
303 ++ dp->plat_data.get_modes = exynos_dp_get_modes;
304 + dp->plat_data.skip_connector = !!bridge;
305 ++
306 + dp->ptn_bridge = bridge;
307 +
308 + out:
309 ++ dp->adp = analogix_dp_probe(dev, &dp->plat_data);
310 ++ if (IS_ERR(dp->adp))
311 ++ return PTR_ERR(dp->adp);
312 ++
313 + return component_add(&pdev->dev, &exynos_dp_ops);
314 + }
315 +
316 + static int exynos_dp_remove(struct platform_device *pdev)
317 + {
318 ++ struct exynos_dp_device *dp = platform_get_drvdata(pdev);
319 ++
320 + component_del(&pdev->dev, &exynos_dp_ops);
321 ++ analogix_dp_remove(dp->adp);
322 +
323 + return 0;
324 + }
325 +diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
326 +index f38f5e113c6b..ce98c08aa8b4 100644
327 +--- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
328 ++++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
329 +@@ -325,15 +325,9 @@ static int rockchip_dp_bind(struct device *dev, struct device *master,
330 + void *data)
331 + {
332 + struct rockchip_dp_device *dp = dev_get_drvdata(dev);
333 +- const struct rockchip_dp_chip_data *dp_data;
334 + struct drm_device *drm_dev = data;
335 + int ret;
336 +
337 +- dp_data = of_device_get_match_data(dev);
338 +- if (!dp_data)
339 +- return -ENODEV;
340 +-
341 +- dp->data = dp_data;
342 + dp->drm_dev = drm_dev;
343 +
344 + ret = rockchip_dp_drm_create_encoder(dp);
345 +@@ -344,16 +338,9 @@ static int rockchip_dp_bind(struct device *dev, struct device *master,
346 +
347 + dp->plat_data.encoder = &dp->encoder;
348 +
349 +- dp->plat_data.dev_type = dp->data->chip_type;
350 +- dp->plat_data.power_on_start = rockchip_dp_poweron_start;
351 +- dp->plat_data.power_off = rockchip_dp_powerdown;
352 +- dp->plat_data.get_modes = rockchip_dp_get_modes;
353 +-
354 +- dp->adp = analogix_dp_bind(dev, dp->drm_dev, &dp->plat_data);
355 +- if (IS_ERR(dp->adp)) {
356 +- ret = PTR_ERR(dp->adp);
357 ++ ret = analogix_dp_bind(dp->adp, drm_dev);
358 ++ if (ret)
359 + goto err_cleanup_encoder;
360 +- }
361 +
362 + return 0;
363 + err_cleanup_encoder:
364 +@@ -368,8 +355,6 @@ static void rockchip_dp_unbind(struct device *dev, struct device *master,
365 +
366 + analogix_dp_unbind(dp->adp);
367 + dp->encoder.funcs->destroy(&dp->encoder);
368 +-
369 +- dp->adp = ERR_PTR(-ENODEV);
370 + }
371 +
372 + static const struct component_ops rockchip_dp_component_ops = {
373 +@@ -380,10 +365,15 @@ static const struct component_ops rockchip_dp_component_ops = {
374 + static int rockchip_dp_probe(struct platform_device *pdev)
375 + {
376 + struct device *dev = &pdev->dev;
377 ++ const struct rockchip_dp_chip_data *dp_data;
378 + struct drm_panel *panel = NULL;
379 + struct rockchip_dp_device *dp;
380 + int ret;
381 +
382 ++ dp_data = of_device_get_match_data(dev);
383 ++ if (!dp_data)
384 ++ return -ENODEV;
385 ++
386 + ret = drm_of_find_panel_or_bridge(dev->of_node, 1, 0, &panel, NULL);
387 + if (ret < 0)
388 + return ret;
389 +@@ -394,7 +384,12 @@ static int rockchip_dp_probe(struct platform_device *pdev)
390 +
391 + dp->dev = dev;
392 + dp->adp = ERR_PTR(-ENODEV);
393 ++ dp->data = dp_data;
394 + dp->plat_data.panel = panel;
395 ++ dp->plat_data.dev_type = dp->data->chip_type;
396 ++ dp->plat_data.power_on_start = rockchip_dp_poweron_start;
397 ++ dp->plat_data.power_off = rockchip_dp_powerdown;
398 ++ dp->plat_data.get_modes = rockchip_dp_get_modes;
399 +
400 + ret = rockchip_dp_of_probe(dp);
401 + if (ret < 0)
402 +@@ -402,12 +397,19 @@ static int rockchip_dp_probe(struct platform_device *pdev)
403 +
404 + platform_set_drvdata(pdev, dp);
405 +
406 ++ dp->adp = analogix_dp_probe(dev, &dp->plat_data);
407 ++ if (IS_ERR(dp->adp))
408 ++ return PTR_ERR(dp->adp);
409 ++
410 + return component_add(dev, &rockchip_dp_component_ops);
411 + }
412 +
413 + static int rockchip_dp_remove(struct platform_device *pdev)
414 + {
415 ++ struct rockchip_dp_device *dp = platform_get_drvdata(pdev);
416 ++
417 + component_del(&pdev->dev, &rockchip_dp_component_ops);
418 ++ analogix_dp_remove(dp->adp);
419 +
420 + return 0;
421 + }
422 +diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
423 +index 15b31cddc054..2e4b4188659a 100644
424 +--- a/drivers/net/ethernet/broadcom/bcmsysport.c
425 ++++ b/drivers/net/ethernet/broadcom/bcmsysport.c
426 +@@ -666,7 +666,8 @@ static struct sk_buff *bcm_sysport_rx_refill(struct bcm_sysport_priv *priv,
427 + dma_addr_t mapping;
428 +
429 + /* Allocate a new SKB for a new packet */
430 +- skb = netdev_alloc_skb(priv->netdev, RX_BUF_LENGTH);
431 ++ skb = __netdev_alloc_skb(priv->netdev, RX_BUF_LENGTH,
432 ++ GFP_ATOMIC | __GFP_NOWARN);
433 + if (!skb) {
434 + priv->mib.alloc_rx_buff_failed++;
435 + netif_err(priv, rx_err, ndev, "SKB alloc failed\n");
436 +diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
437 +index b7c0c20e1325..5fd1a9dfcfff 100644
438 +--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
439 ++++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
440 +@@ -1625,7 +1625,8 @@ static struct sk_buff *bcmgenet_rx_refill(struct bcmgenet_priv *priv,
441 + dma_addr_t mapping;
442 +
443 + /* Allocate a new Rx skb */
444 +- skb = netdev_alloc_skb(priv->dev, priv->rx_buf_len + SKB_ALIGNMENT);
445 ++ skb = __netdev_alloc_skb(priv->dev, priv->rx_buf_len + SKB_ALIGNMENT,
446 ++ GFP_ATOMIC | __GFP_NOWARN);
447 + if (!skb) {
448 + priv->mib.alloc_rx_buff_failed++;
449 + netif_err(priv, rx_err, priv->dev,
450 +diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
451 +index fa32cd5b418e..70d41783329d 100644
452 +--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
453 ++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
454 +@@ -291,16 +291,19 @@ static int socfpga_gen5_set_phy_mode(struct socfpga_dwmac *dwmac)
455 + phymode == PHY_INTERFACE_MODE_MII ||
456 + phymode == PHY_INTERFACE_MODE_GMII ||
457 + phymode == PHY_INTERFACE_MODE_SGMII) {
458 +- ctrl |= SYSMGR_EMACGRP_CTRL_PTP_REF_CLK_MASK << (reg_shift / 2);
459 + regmap_read(sys_mgr_base_addr, SYSMGR_FPGAGRP_MODULE_REG,
460 + &module);
461 + module |= (SYSMGR_FPGAGRP_MODULE_EMAC << (reg_shift / 2));
462 + regmap_write(sys_mgr_base_addr, SYSMGR_FPGAGRP_MODULE_REG,
463 + module);
464 +- } else {
465 +- ctrl &= ~(SYSMGR_EMACGRP_CTRL_PTP_REF_CLK_MASK << (reg_shift / 2));
466 + }
467 +
468 ++ if (dwmac->f2h_ptp_ref_clk)
469 ++ ctrl |= SYSMGR_EMACGRP_CTRL_PTP_REF_CLK_MASK << (reg_shift / 2);
470 ++ else
471 ++ ctrl &= ~(SYSMGR_EMACGRP_CTRL_PTP_REF_CLK_MASK <<
472 ++ (reg_shift / 2));
473 ++
474 + regmap_write(sys_mgr_base_addr, reg_offset, ctrl);
475 +
476 + /* Deassert reset for the phy configuration to be sampled by
477 +diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
478 +index 020159622559..e5d9007c8090 100644
479 +--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
480 ++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
481 +@@ -26,12 +26,16 @@ static void config_sub_second_increment(void __iomem *ioaddr,
482 + unsigned long data;
483 + u32 reg_value;
484 +
485 +- /* For GMAC3.x, 4.x versions, convert the ptp_clock to nano second
486 +- * formula = (1/ptp_clock) * 1000000000
487 +- * where ptp_clock is 50MHz if fine method is used to update system
488 ++ /* For GMAC3.x, 4.x versions, in "fine adjustement mode" set sub-second
489 ++ * increment to twice the number of nanoseconds of a clock cycle.
490 ++ * The calculation of the default_addend value by the caller will set it
491 ++ * to mid-range = 2^31 when the remainder of this division is zero,
492 ++ * which will make the accumulator overflow once every 2 ptp_clock
493 ++ * cycles, adding twice the number of nanoseconds of a clock cycle :
494 ++ * 2000000000ULL / ptp_clock.
495 + */
496 + if (value & PTP_TCR_TSCFUPDT)
497 +- data = (1000000000ULL / 50000000);
498 ++ data = (2000000000ULL / ptp_clock);
499 + else
500 + data = (1000000000ULL / ptp_clock);
501 +
502 +diff --git a/drivers/net/phy/bcm84881.c b/drivers/net/phy/bcm84881.c
503 +index 14d55a77eb28..126011582928 100644
504 +--- a/drivers/net/phy/bcm84881.c
505 ++++ b/drivers/net/phy/bcm84881.c
506 +@@ -174,9 +174,6 @@ static int bcm84881_read_status(struct phy_device *phydev)
507 + if (phydev->autoneg == AUTONEG_ENABLE && !phydev->autoneg_complete)
508 + phydev->link = false;
509 +
510 +- if (!phydev->link)
511 +- return 0;
512 +-
513 + linkmode_zero(phydev->lp_advertising);
514 + phydev->speed = SPEED_UNKNOWN;
515 + phydev->duplex = DUPLEX_UNKNOWN;
516 +@@ -184,6 +181,9 @@ static int bcm84881_read_status(struct phy_device *phydev)
517 + phydev->asym_pause = 0;
518 + phydev->mdix = 0;
519 +
520 ++ if (!phydev->link)
521 ++ return 0;
522 ++
523 + if (phydev->autoneg_complete) {
524 + val = genphy_c45_read_lpa(phydev);
525 + if (val < 0)
526 +diff --git a/drivers/net/wimax/i2400m/usb-fw.c b/drivers/net/wimax/i2400m/usb-fw.c
527 +index 529ebca1e9e1..1f7709d24f35 100644
528 +--- a/drivers/net/wimax/i2400m/usb-fw.c
529 ++++ b/drivers/net/wimax/i2400m/usb-fw.c
530 +@@ -354,6 +354,7 @@ out:
531 + usb_autopm_put_interface(i2400mu->usb_iface);
532 + d_fnend(8, dev, "(i2400m %p ack %p size %zu) = %ld\n",
533 + i2400m, ack, ack_size, (long) result);
534 ++ usb_put_urb(&notif_urb);
535 + return result;
536 +
537 + error_exceeded:
538 +diff --git a/drivers/platform/x86/gpd-pocket-fan.c b/drivers/platform/x86/gpd-pocket-fan.c
539 +index b471b86c28fe..5b516e4c2bfb 100644
540 +--- a/drivers/platform/x86/gpd-pocket-fan.c
541 ++++ b/drivers/platform/x86/gpd-pocket-fan.c
542 +@@ -128,7 +128,7 @@ static int gpd_pocket_fan_probe(struct platform_device *pdev)
543 +
544 + for (i = 0; i < ARRAY_SIZE(temp_limits); i++) {
545 + if (temp_limits[i] < 20000 || temp_limits[i] > 90000) {
546 +- dev_err(&pdev->dev, "Invalid temp-limit %d (must be between 40000 and 70000)\n",
547 ++ dev_err(&pdev->dev, "Invalid temp-limit %d (must be between 20000 and 90000)\n",
548 + temp_limits[i]);
549 + temp_limits[0] = TEMP_LIMIT0_DEFAULT;
550 + temp_limits[1] = TEMP_LIMIT1_DEFAULT;
551 +diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
552 +index 0b1d737b0e97..8844fc56c5f6 100644
553 +--- a/drivers/remoteproc/qcom_q6v5_mss.c
554 ++++ b/drivers/remoteproc/qcom_q6v5_mss.c
555 +@@ -1607,7 +1607,7 @@ static int q6v5_probe(struct platform_device *pdev)
556 + ret = of_property_read_string_index(pdev->dev.of_node, "firmware-name",
557 + 1, &qproc->hexagon_mdt_image);
558 + if (ret < 0 && ret != -EINVAL)
559 +- return ret;
560 ++ goto free_rproc;
561 +
562 + platform_set_drvdata(pdev, qproc);
563 +
564 +diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
565 +index 9c0ee192f0f9..20472aaaf630 100644
566 +--- a/drivers/scsi/sg.c
567 ++++ b/drivers/scsi/sg.c
568 +@@ -685,8 +685,10 @@ sg_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos)
569 + hp->flags = input_size; /* structure abuse ... */
570 + hp->pack_id = old_hdr.pack_id;
571 + hp->usr_ptr = NULL;
572 +- if (copy_from_user(cmnd, buf, cmd_size))
573 ++ if (copy_from_user(cmnd, buf, cmd_size)) {
574 ++ sg_remove_request(sfp, srp);
575 + return -EFAULT;
576 ++ }
577 + /*
578 + * SG_DXFER_TO_FROM_DEV is functionally equivalent to SG_DXFER_FROM_DEV,
579 + * but is is possible that the app intended SG_DXFER_TO_DEV, because there
580 +diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
581 +index 3ecc69c5b150..ce4acbf7fef9 100644
582 +--- a/drivers/usb/dwc3/core.h
583 ++++ b/drivers/usb/dwc3/core.h
584 +@@ -310,6 +310,10 @@
585 + #define DWC3_GTXFIFOSIZ_TXFDEF(n) ((n) & 0xffff)
586 + #define DWC3_GTXFIFOSIZ_TXFSTADDR(n) ((n) & 0xffff0000)
587 +
588 ++/* Global RX Fifo Size Register */
589 ++#define DWC31_GRXFIFOSIZ_RXFDEP(n) ((n) & 0x7fff) /* DWC_usb31 only */
590 ++#define DWC3_GRXFIFOSIZ_RXFDEP(n) ((n) & 0xffff)
591 ++
592 + /* Global Event Size Registers */
593 + #define DWC3_GEVNTSIZ_INTMASK BIT(31)
594 + #define DWC3_GEVNTSIZ_SIZE(n) ((n) & 0xffff)
595 +diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
596 +index c4be4631937a..bc1cf6d0412a 100644
597 +--- a/drivers/usb/dwc3/gadget.c
598 ++++ b/drivers/usb/dwc3/gadget.c
599 +@@ -2223,7 +2223,6 @@ static int dwc3_gadget_init_in_endpoint(struct dwc3_ep *dep)
600 + {
601 + struct dwc3 *dwc = dep->dwc;
602 + int mdwidth;
603 +- int kbytes;
604 + int size;
605 +
606 + mdwidth = DWC3_MDWIDTH(dwc->hwparams.hwparams0);
607 +@@ -2239,17 +2238,17 @@ static int dwc3_gadget_init_in_endpoint(struct dwc3_ep *dep)
608 + /* FIFO Depth is in MDWDITH bytes. Multiply */
609 + size *= mdwidth;
610 +
611 +- kbytes = size / 1024;
612 +- if (kbytes == 0)
613 +- kbytes = 1;
614 +-
615 + /*
616 +- * FIFO sizes account an extra MDWIDTH * (kbytes + 1) bytes for
617 +- * internal overhead. We don't really know how these are used,
618 +- * but documentation say it exists.
619 ++ * To meet performance requirement, a minimum TxFIFO size of 3x
620 ++ * MaxPacketSize is recommended for endpoints that support burst and a
621 ++ * minimum TxFIFO size of 2x MaxPacketSize for endpoints that don't
622 ++ * support burst. Use those numbers and we can calculate the max packet
623 ++ * limit as below.
624 + */
625 +- size -= mdwidth * (kbytes + 1);
626 +- size /= kbytes;
627 ++ if (dwc->maximum_speed >= USB_SPEED_SUPER)
628 ++ size /= 3;
629 ++ else
630 ++ size /= 2;
631 +
632 + usb_ep_set_maxpacket_limit(&dep->endpoint, size);
633 +
634 +@@ -2267,8 +2266,39 @@ static int dwc3_gadget_init_in_endpoint(struct dwc3_ep *dep)
635 + static int dwc3_gadget_init_out_endpoint(struct dwc3_ep *dep)
636 + {
637 + struct dwc3 *dwc = dep->dwc;
638 ++ int mdwidth;
639 ++ int size;
640 ++
641 ++ mdwidth = DWC3_MDWIDTH(dwc->hwparams.hwparams0);
642 ++
643 ++ /* MDWIDTH is represented in bits, convert to bytes */
644 ++ mdwidth /= 8;
645 +
646 +- usb_ep_set_maxpacket_limit(&dep->endpoint, 1024);
647 ++ /* All OUT endpoints share a single RxFIFO space */
648 ++ size = dwc3_readl(dwc->regs, DWC3_GRXFIFOSIZ(0));
649 ++ if (dwc3_is_usb31(dwc))
650 ++ size = DWC31_GRXFIFOSIZ_RXFDEP(size);
651 ++ else
652 ++ size = DWC3_GRXFIFOSIZ_RXFDEP(size);
653 ++
654 ++ /* FIFO depth is in MDWDITH bytes */
655 ++ size *= mdwidth;
656 ++
657 ++ /*
658 ++ * To meet performance requirement, a minimum recommended RxFIFO size
659 ++ * is defined as follow:
660 ++ * RxFIFO size >= (3 x MaxPacketSize) +
661 ++ * (3 x 8 bytes setup packets size) + (16 bytes clock crossing margin)
662 ++ *
663 ++ * Then calculate the max packet limit as below.
664 ++ */
665 ++ size -= (3 * 8) + 16;
666 ++ if (size < 0)
667 ++ size = 0;
668 ++ else
669 ++ size /= 3;
670 ++
671 ++ usb_ep_set_maxpacket_limit(&dep->endpoint, size);
672 + dep->endpoint.max_streams = 15;
673 + dep->endpoint.ops = &dwc3_gadget_ep_ops;
674 + list_add_tail(&dep->endpoint.ep_list,
675 +diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
676 +index c2d7d57e98cf..bb3f63386b47 100644
677 +--- a/drivers/vhost/vsock.c
678 ++++ b/drivers/vhost/vsock.c
679 +@@ -543,6 +543,11 @@ static int vhost_vsock_start(struct vhost_vsock *vsock)
680 + mutex_unlock(&vq->mutex);
681 + }
682 +
683 ++ /* Some packets may have been queued before the device was started,
684 ++ * let's kick the send worker to send them.
685 ++ */
686 ++ vhost_work_queue(&vsock->dev, &vsock->send_pkt_work);
687 ++
688 + mutex_unlock(&vsock->dev.mutex);
689 + return 0;
690 +
691 +diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
692 +index 4804d1df8c1c..9c614d6916c2 100644
693 +--- a/fs/cifs/connect.c
694 ++++ b/fs/cifs/connect.c
695 +@@ -375,8 +375,10 @@ static int reconn_set_ipaddr(struct TCP_Server_Info *server)
696 + return rc;
697 + }
698 +
699 ++ spin_lock(&cifs_tcp_ses_lock);
700 + rc = cifs_convert_address((struct sockaddr *)&server->dstaddr, ipaddr,
701 + strlen(ipaddr));
702 ++ spin_unlock(&cifs_tcp_ses_lock);
703 + kfree(ipaddr);
704 +
705 + return !rc ? -1 : 0;
706 +@@ -3417,6 +3419,10 @@ cifs_find_tcon(struct cifs_ses *ses, struct smb_vol *volume_info)
707 + spin_lock(&cifs_tcp_ses_lock);
708 + list_for_each(tmp, &ses->tcon_list) {
709 + tcon = list_entry(tmp, struct cifs_tcon, tcon_list);
710 ++#ifdef CONFIG_CIFS_DFS_UPCALL
711 ++ if (tcon->dfs_path)
712 ++ continue;
713 ++#endif
714 + if (!match_tcon(tcon, volume_info))
715 + continue;
716 + ++tcon->tc_count;
717 +diff --git a/include/drm/bridge/analogix_dp.h b/include/drm/bridge/analogix_dp.h
718 +index 7aa2f93da49c..b0dcc07334a1 100644
719 +--- a/include/drm/bridge/analogix_dp.h
720 ++++ b/include/drm/bridge/analogix_dp.h
721 +@@ -42,9 +42,10 @@ int analogix_dp_resume(struct analogix_dp_device *dp);
722 + int analogix_dp_suspend(struct analogix_dp_device *dp);
723 +
724 + struct analogix_dp_device *
725 +-analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
726 +- struct analogix_dp_plat_data *plat_data);
727 ++analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data);
728 ++int analogix_dp_bind(struct analogix_dp_device *dp, struct drm_device *drm_dev);
729 + void analogix_dp_unbind(struct analogix_dp_device *dp);
730 ++void analogix_dp_remove(struct analogix_dp_device *dp);
731 +
732 + int analogix_dp_start_crc(struct drm_connector *connector);
733 + int analogix_dp_stop_crc(struct drm_connector *connector);
734 +diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
735 +index 73c66a3a33ae..7f3486e32e5d 100644
736 +--- a/include/linux/ieee80211.h
737 ++++ b/include/linux/ieee80211.h
738 +@@ -619,6 +619,15 @@ static inline bool ieee80211_is_qos_nullfunc(__le16 fc)
739 + cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC);
740 + }
741 +
742 ++/**
743 ++ * ieee80211_is_any_nullfunc - check if frame is regular or QoS nullfunc frame
744 ++ * @fc: frame control bytes in little-endian byteorder
745 ++ */
746 ++static inline bool ieee80211_is_any_nullfunc(__le16 fc)
747 ++{
748 ++ return (ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc));
749 ++}
750 ++
751 + /**
752 + * ieee80211_is_bufferable_mmpdu - check if frame is bufferable MMPDU
753 + * @fc: frame control field in little-endian byteorder
754 +diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
755 +index fd81c7de77a7..63089c70adbb 100644
756 +--- a/kernel/trace/ftrace.c
757 ++++ b/kernel/trace/ftrace.c
758 +@@ -5155,6 +5155,7 @@ int unregister_ftrace_direct(unsigned long ip, unsigned long addr)
759 + list_del_rcu(&direct->next);
760 + synchronize_rcu_tasks();
761 + kfree(direct);
762 ++ kfree(entry);
763 + ftrace_direct_func_count--;
764 + }
765 + }
766 +diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
767 +index 5f6834a2bf41..fcab11cc6833 100644
768 +--- a/kernel/trace/trace_events_hist.c
769 ++++ b/kernel/trace/trace_events_hist.c
770 +@@ -3320,6 +3320,9 @@ static void __destroy_hist_field(struct hist_field *hist_field)
771 + kfree(hist_field->name);
772 + kfree(hist_field->type);
773 +
774 ++ kfree(hist_field->system);
775 ++ kfree(hist_field->event_name);
776 ++
777 + kfree(hist_field);
778 + }
779 +
780 +@@ -4382,6 +4385,7 @@ static struct hist_field *create_var(struct hist_trigger_data *hist_data,
781 + goto out;
782 + }
783 +
784 ++ var->ref = 1;
785 + var->flags = HIST_FIELD_FL_VAR;
786 + var->var.idx = idx;
787 + var->var.hist_data = var->hist_data = hist_data;
788 +@@ -5011,6 +5015,9 @@ static void destroy_field_vars(struct hist_trigger_data *hist_data)
789 +
790 + for (i = 0; i < hist_data->n_field_vars; i++)
791 + destroy_field_var(hist_data->field_vars[i]);
792 ++
793 ++ for (i = 0; i < hist_data->n_save_vars; i++)
794 ++ destroy_field_var(hist_data->save_vars[i]);
795 + }
796 +
797 + static void save_field_var(struct hist_trigger_data *hist_data,
798 +diff --git a/lib/mpi/longlong.h b/lib/mpi/longlong.h
799 +index 2dceaca27489..891e1c3549c4 100644
800 +--- a/lib/mpi/longlong.h
801 ++++ b/lib/mpi/longlong.h
802 +@@ -722,22 +722,22 @@ do { \
803 + do { \
804 + if (__builtin_constant_p(bh) && (bh) == 0) \
805 + __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \
806 +- : "=r" ((USItype)(sh)), \
807 +- "=&r" ((USItype)(sl)) \
808 ++ : "=r" (sh), \
809 ++ "=&r" (sl) \
810 + : "%r" ((USItype)(ah)), \
811 + "%r" ((USItype)(al)), \
812 + "rI" ((USItype)(bl))); \
813 + else if (__builtin_constant_p(bh) && (bh) == ~(USItype) 0) \
814 + __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \
815 +- : "=r" ((USItype)(sh)), \
816 +- "=&r" ((USItype)(sl)) \
817 ++ : "=r" (sh), \
818 ++ "=&r" (sl) \
819 + : "%r" ((USItype)(ah)), \
820 + "%r" ((USItype)(al)), \
821 + "rI" ((USItype)(bl))); \
822 + else \
823 + __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \
824 +- : "=r" ((USItype)(sh)), \
825 +- "=&r" ((USItype)(sl)) \
826 ++ : "=r" (sh), \
827 ++ "=&r" (sl) \
828 + : "%r" ((USItype)(ah)), \
829 + "r" ((USItype)(bh)), \
830 + "%r" ((USItype)(al)), \
831 +@@ -747,36 +747,36 @@ do { \
832 + do { \
833 + if (__builtin_constant_p(ah) && (ah) == 0) \
834 + __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \
835 +- : "=r" ((USItype)(sh)), \
836 +- "=&r" ((USItype)(sl)) \
837 ++ : "=r" (sh), \
838 ++ "=&r" (sl) \
839 + : "r" ((USItype)(bh)), \
840 + "rI" ((USItype)(al)), \
841 + "r" ((USItype)(bl))); \
842 + else if (__builtin_constant_p(ah) && (ah) == ~(USItype) 0) \
843 + __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \
844 +- : "=r" ((USItype)(sh)), \
845 +- "=&r" ((USItype)(sl)) \
846 ++ : "=r" (sh), \
847 ++ "=&r" (sl) \
848 + : "r" ((USItype)(bh)), \
849 + "rI" ((USItype)(al)), \
850 + "r" ((USItype)(bl))); \
851 + else if (__builtin_constant_p(bh) && (bh) == 0) \
852 + __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \
853 +- : "=r" ((USItype)(sh)), \
854 +- "=&r" ((USItype)(sl)) \
855 ++ : "=r" (sh), \
856 ++ "=&r" (sl) \
857 + : "r" ((USItype)(ah)), \
858 + "rI" ((USItype)(al)), \
859 + "r" ((USItype)(bl))); \
860 + else if (__builtin_constant_p(bh) && (bh) == ~(USItype) 0) \
861 + __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \
862 +- : "=r" ((USItype)(sh)), \
863 +- "=&r" ((USItype)(sl)) \
864 ++ : "=r" (sh), \
865 ++ "=&r" (sl) \
866 + : "r" ((USItype)(ah)), \
867 + "rI" ((USItype)(al)), \
868 + "r" ((USItype)(bl))); \
869 + else \
870 + __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \
871 +- : "=r" ((USItype)(sh)), \
872 +- "=&r" ((USItype)(sl)) \
873 ++ : "=r" (sh), \
874 ++ "=&r" (sl) \
875 + : "r" ((USItype)(ah)), \
876 + "r" ((USItype)(bh)), \
877 + "rI" ((USItype)(al)), \
878 +@@ -787,7 +787,7 @@ do { \
879 + do { \
880 + USItype __m0 = (m0), __m1 = (m1); \
881 + __asm__ ("mulhwu %0,%1,%2" \
882 +- : "=r" ((USItype) ph) \
883 ++ : "=r" (ph) \
884 + : "%r" (__m0), \
885 + "r" (__m1)); \
886 + (pl) = __m0 * __m1; \
887 +diff --git a/mm/mremap.c b/mm/mremap.c
888 +index af363063ea23..d28f08a36b96 100644
889 +--- a/mm/mremap.c
890 ++++ b/mm/mremap.c
891 +@@ -606,6 +606,16 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
892 + LIST_HEAD(uf_unmap_early);
893 + LIST_HEAD(uf_unmap);
894 +
895 ++ /*
896 ++ * There is a deliberate asymmetry here: we strip the pointer tag
897 ++ * from the old address but leave the new address alone. This is
898 ++ * for consistency with mmap(), where we prevent the creation of
899 ++ * aliasing mappings in userspace by leaving the tag bits of the
900 ++ * mapping address intact. A non-zero tag will cause the subsequent
901 ++ * range checks to reject the address as invalid.
902 ++ *
903 ++ * See Documentation/arm64/tagged-address-abi.rst for more information.
904 ++ */
905 + addr = untagged_addr(addr);
906 +
907 + if (flags & ~(MREMAP_FIXED | MREMAP_MAYMOVE))
908 +diff --git a/net/core/netclassid_cgroup.c b/net/core/netclassid_cgroup.c
909 +index b4c87fe31be2..41b24cd31562 100644
910 +--- a/net/core/netclassid_cgroup.c
911 ++++ b/net/core/netclassid_cgroup.c
912 +@@ -127,10 +127,8 @@ static int write_classid(struct cgroup_subsys_state *css, struct cftype *cft,
913 + cs->classid = (u32)value;
914 +
915 + css_task_iter_start(css, 0, &it);
916 +- while ((p = css_task_iter_next(&it))) {
917 ++ while ((p = css_task_iter_next(&it)))
918 + update_classid_task(p, cs->classid);
919 +- cond_resched();
920 +- }
921 + css_task_iter_end(&it);
922 +
923 + return 0;
924 +diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
925 +index 88d7a692a965..c21fbc6cc991 100644
926 +--- a/net/mac80211/mlme.c
927 ++++ b/net/mac80211/mlme.c
928 +@@ -2460,7 +2460,7 @@ void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata,
929 + if (!ieee80211_is_data(hdr->frame_control))
930 + return;
931 +
932 +- if (ieee80211_is_nullfunc(hdr->frame_control) &&
933 ++ if (ieee80211_is_any_nullfunc(hdr->frame_control) &&
934 + sdata->u.mgd.probe_send_count > 0) {
935 + if (ack)
936 + ieee80211_sta_reset_conn_monitor(sdata);
937 +diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
938 +index 0ba98ad9bc85..69429c8df7b3 100644
939 +--- a/net/mac80211/rx.c
940 ++++ b/net/mac80211/rx.c
941 +@@ -1450,8 +1450,7 @@ ieee80211_rx_h_check_dup(struct ieee80211_rx_data *rx)
942 + return RX_CONTINUE;
943 +
944 + if (ieee80211_is_ctl(hdr->frame_control) ||
945 +- ieee80211_is_nullfunc(hdr->frame_control) ||
946 +- ieee80211_is_qos_nullfunc(hdr->frame_control) ||
947 ++ ieee80211_is_any_nullfunc(hdr->frame_control) ||
948 + is_multicast_ether_addr(hdr->addr1))
949 + return RX_CONTINUE;
950 +
951 +@@ -1838,8 +1837,7 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
952 + * Drop (qos-)data::nullfunc frames silently, since they
953 + * are used only to control station power saving mode.
954 + */
955 +- if (ieee80211_is_nullfunc(hdr->frame_control) ||
956 +- ieee80211_is_qos_nullfunc(hdr->frame_control)) {
957 ++ if (ieee80211_is_any_nullfunc(hdr->frame_control)) {
958 + I802_DEBUG_INC(rx->local->rx_handlers_drop_nullfunc);
959 +
960 + /*
961 +@@ -2319,7 +2317,7 @@ static int ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)
962 +
963 + /* Drop unencrypted frames if key is set. */
964 + if (unlikely(!ieee80211_has_protected(fc) &&
965 +- !ieee80211_is_nullfunc(fc) &&
966 ++ !ieee80211_is_any_nullfunc(fc) &&
967 + ieee80211_is_data(fc) && rx->key))
968 + return -EACCES;
969 +
970 +diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
971 +index e3572be307d6..149ed0510778 100644
972 +--- a/net/mac80211/sta_info.c
973 ++++ b/net/mac80211/sta_info.c
974 +@@ -231,7 +231,8 @@ struct sta_info *sta_info_get_by_idx(struct ieee80211_sub_if_data *sdata,
975 + struct sta_info *sta;
976 + int i = 0;
977 +
978 +- list_for_each_entry_rcu(sta, &local->sta_list, list) {
979 ++ list_for_each_entry_rcu(sta, &local->sta_list, list,
980 ++ lockdep_is_held(&local->sta_mtx)) {
981 + if (sdata != sta->sdata)
982 + continue;
983 + if (i < idx) {
984 +diff --git a/net/mac80211/status.c b/net/mac80211/status.c
985 +index b720feaf9a74..2c2d78bcd78a 100644
986 +--- a/net/mac80211/status.c
987 ++++ b/net/mac80211/status.c
988 +@@ -643,8 +643,7 @@ static void ieee80211_report_ack_skb(struct ieee80211_local *local,
989 + rcu_read_lock();
990 + sdata = ieee80211_sdata_from_skb(local, skb);
991 + if (sdata) {
992 +- if (ieee80211_is_nullfunc(hdr->frame_control) ||
993 +- ieee80211_is_qos_nullfunc(hdr->frame_control))
994 ++ if (ieee80211_is_any_nullfunc(hdr->frame_control))
995 + cfg80211_probe_status(sdata->dev, hdr->addr1,
996 + cookie, acked,
997 + info->status.ack_signal,
998 +@@ -1056,7 +1055,7 @@ static void __ieee80211_tx_status(struct ieee80211_hw *hw,
999 + I802_DEBUG_INC(local->dot11FailedCount);
1000 + }
1001 +
1002 +- if ((ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc)) &&
1003 ++ if (ieee80211_is_any_nullfunc(fc) &&
1004 + ieee80211_has_pm(fc) &&
1005 + ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS) &&
1006 + !(info->flags & IEEE80211_TX_CTL_INJECTED) &&
1007 +diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
1008 +index efe4c1fc68e5..a7b92d1feee1 100644
1009 +--- a/net/mac80211/tx.c
1010 ++++ b/net/mac80211/tx.c
1011 +@@ -297,7 +297,7 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
1012 + if (unlikely(test_bit(SCAN_SW_SCANNING, &tx->local->scanning)) &&
1013 + test_bit(SDATA_STATE_OFFCHANNEL, &tx->sdata->state) &&
1014 + !ieee80211_is_probe_req(hdr->frame_control) &&
1015 +- !ieee80211_is_nullfunc(hdr->frame_control))
1016 ++ !ieee80211_is_any_nullfunc(hdr->frame_control))
1017 + /*
1018 + * When software scanning only nullfunc frames (to notify
1019 + * the sleep state to the AP) and probe requests (for the
1020 +diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
1021 +index 09050c1d5517..f7cb0b7faec2 100644
1022 +--- a/net/sctp/sm_make_chunk.c
1023 ++++ b/net/sctp/sm_make_chunk.c
1024 +@@ -858,7 +858,11 @@ struct sctp_chunk *sctp_make_shutdown(const struct sctp_association *asoc,
1025 + struct sctp_chunk *retval;
1026 + __u32 ctsn;
1027 +
1028 +- ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map);
1029 ++ if (chunk && chunk->asoc)
1030 ++ ctsn = sctp_tsnmap_get_ctsn(&chunk->asoc->peer.tsn_map);
1031 ++ else
1032 ++ ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map);
1033 ++
1034 + shut.cum_tsn_ack = htonl(ctsn);
1035 +
1036 + retval = sctp_make_control(asoc, SCTP_CID_SHUTDOWN, 0,
1037 +diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
1038 +index bd843a81afa0..d36cea4e270d 100644
1039 +--- a/net/sunrpc/cache.c
1040 ++++ b/net/sunrpc/cache.c
1041 +@@ -521,7 +521,6 @@ void cache_purge(struct cache_detail *detail)
1042 + {
1043 + struct cache_head *ch = NULL;
1044 + struct hlist_head *head = NULL;
1045 +- struct hlist_node *tmp = NULL;
1046 + int i = 0;
1047 +
1048 + spin_lock(&detail->hash_lock);
1049 +@@ -533,7 +532,9 @@ void cache_purge(struct cache_detail *detail)
1050 + dprintk("RPC: %d entries in %s cache\n", detail->entries, detail->name);
1051 + for (i = 0; i < detail->hash_size; i++) {
1052 + head = &detail->hash_table[i];
1053 +- hlist_for_each_entry_safe(ch, tmp, head, cache_list) {
1054 ++ while (!hlist_empty(head)) {
1055 ++ ch = hlist_entry(head->first, struct cache_head,
1056 ++ cache_list);
1057 + sunrpc_begin_cache_remove_entry(ch, detail);
1058 + spin_unlock(&detail->hash_lock);
1059 + sunrpc_end_cache_remove_entry(ch, detail);
1060 +diff --git a/scripts/config b/scripts/config
1061 +index e0e39826dae9..eee5b7f3a092 100755
1062 +--- a/scripts/config
1063 ++++ b/scripts/config
1064 +@@ -7,6 +7,9 @@ myname=${0##*/}
1065 + # If no prefix forced, use the default CONFIG_
1066 + CONFIG_="${CONFIG_-CONFIG_}"
1067 +
1068 ++# We use an uncommon delimiter for sed substitutions
1069 ++SED_DELIM=$(echo -en "\001")
1070 ++
1071 + usage() {
1072 + cat >&2 <<EOL
1073 + Manipulate options in a .config file from the command line.
1074 +@@ -83,7 +86,7 @@ txt_subst() {
1075 + local infile="$3"
1076 + local tmpfile="$infile.swp"
1077 +
1078 +- sed -e "s:$before:$after:" "$infile" >"$tmpfile"
1079 ++ sed -e "s$SED_DELIM$before$SED_DELIM$after$SED_DELIM" "$infile" >"$tmpfile"
1080 + # replace original file with the edited one
1081 + mv "$tmpfile" "$infile"
1082 + }
1083 +diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
1084 +index 59b60b1f26f8..8b015b27e9c7 100644
1085 +--- a/sound/pci/hda/hda_intel.c
1086 ++++ b/sound/pci/hda/hda_intel.c
1087 +@@ -2075,9 +2075,10 @@ static void pcm_mmap_prepare(struct snd_pcm_substream *substream,
1088 + * some HD-audio PCI entries are exposed without any codecs, and such devices
1089 + * should be ignored from the beginning.
1090 + */
1091 +-static const struct snd_pci_quirk driver_blacklist[] = {
1092 +- SND_PCI_QUIRK(0x1462, 0xcb59, "MSI TRX40 Creator", 0),
1093 +- SND_PCI_QUIRK(0x1462, 0xcb60, "MSI TRX40", 0),
1094 ++static const struct pci_device_id driver_blacklist[] = {
1095 ++ { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1043, 0x874f) }, /* ASUS ROG Zenith II / Strix */
1096 ++ { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1462, 0xcb59) }, /* MSI TRX40 Creator */
1097 ++ { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1462, 0xcb60) }, /* MSI TRX40 */
1098 + {}
1099 + };
1100 +
1101 +@@ -2097,7 +2098,7 @@ static int azx_probe(struct pci_dev *pci,
1102 + bool schedule_probe;
1103 + int err;
1104 +
1105 +- if (snd_pci_quirk_lookup(pci, driver_blacklist)) {
1106 ++ if (pci_match_id(driver_blacklist, pci)) {
1107 + dev_info(&pci->dev, "Skipping the blacklisted device\n");
1108 + return -ENODEV;
1109 + }
1110 +diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
1111 +index e6558475e006..f0f689ddbefe 100644
1112 +--- a/sound/soc/codecs/hdac_hdmi.c
1113 ++++ b/sound/soc/codecs/hdac_hdmi.c
1114 +@@ -142,14 +142,14 @@ static struct hdac_hdmi_pcm *
1115 + hdac_hdmi_get_pcm_from_cvt(struct hdac_hdmi_priv *hdmi,
1116 + struct hdac_hdmi_cvt *cvt)
1117 + {
1118 +- struct hdac_hdmi_pcm *pcm = NULL;
1119 ++ struct hdac_hdmi_pcm *pcm;
1120 +
1121 + list_for_each_entry(pcm, &hdmi->pcm_list, head) {
1122 + if (pcm->cvt == cvt)
1123 +- break;
1124 ++ return pcm;
1125 + }
1126 +
1127 +- return pcm;
1128 ++ return NULL;
1129 + }
1130 +
1131 + static void hdac_hdmi_jack_report(struct hdac_hdmi_pcm *pcm,
1132 +diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
1133 +index d5130193b4a2..e8a8bf7b4ffe 100644
1134 +--- a/sound/soc/codecs/sgtl5000.c
1135 ++++ b/sound/soc/codecs/sgtl5000.c
1136 +@@ -1653,6 +1653,40 @@ static int sgtl5000_i2c_probe(struct i2c_client *client,
1137 + dev_err(&client->dev,
1138 + "Error %d initializing CHIP_CLK_CTRL\n", ret);
1139 +
1140 ++ /* Mute everything to avoid pop from the following power-up */
1141 ++ ret = regmap_write(sgtl5000->regmap, SGTL5000_CHIP_ANA_CTRL,
1142 ++ SGTL5000_CHIP_ANA_CTRL_DEFAULT);
1143 ++ if (ret) {
1144 ++ dev_err(&client->dev,
1145 ++ "Error %d muting outputs via CHIP_ANA_CTRL\n", ret);
1146 ++ goto disable_clk;
1147 ++ }
1148 ++
1149 ++ /*
1150 ++ * If VAG is powered-on (e.g. from previous boot), it would be disabled
1151 ++ * by the write to ANA_POWER in later steps of the probe code. This
1152 ++ * may create a loud pop even with all outputs muted. The proper way
1153 ++ * to circumvent this is disabling the bit first and waiting the proper
1154 ++ * cool-down time.
1155 ++ */
1156 ++ ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ANA_POWER, &value);
1157 ++ if (ret) {
1158 ++ dev_err(&client->dev, "Failed to read ANA_POWER: %d\n", ret);
1159 ++ goto disable_clk;
1160 ++ }
1161 ++ if (value & SGTL5000_VAG_POWERUP) {
1162 ++ ret = regmap_update_bits(sgtl5000->regmap,
1163 ++ SGTL5000_CHIP_ANA_POWER,
1164 ++ SGTL5000_VAG_POWERUP,
1165 ++ 0);
1166 ++ if (ret) {
1167 ++ dev_err(&client->dev, "Error %d disabling VAG\n", ret);
1168 ++ goto disable_clk;
1169 ++ }
1170 ++
1171 ++ msleep(SGTL5000_VAG_POWERDOWN_DELAY);
1172 ++ }
1173 ++
1174 + /* Follow section 2.2.1.1 of AN3663 */
1175 + ana_pwr = SGTL5000_ANA_POWER_DEFAULT;
1176 + if (sgtl5000->num_supplies <= VDDD) {
1177 +diff --git a/sound/soc/codecs/sgtl5000.h b/sound/soc/codecs/sgtl5000.h
1178 +index a4bf4bca95bf..56ec5863f250 100644
1179 +--- a/sound/soc/codecs/sgtl5000.h
1180 ++++ b/sound/soc/codecs/sgtl5000.h
1181 +@@ -233,6 +233,7 @@
1182 + /*
1183 + * SGTL5000_CHIP_ANA_CTRL
1184 + */
1185 ++#define SGTL5000_CHIP_ANA_CTRL_DEFAULT 0x0133
1186 + #define SGTL5000_LINE_OUT_MUTE 0x0100
1187 + #define SGTL5000_HP_SEL_MASK 0x0040
1188 + #define SGTL5000_HP_SEL_SHIFT 6
1189 +diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
1190 +index fc5d089868df..4a7d3413917f 100644
1191 +--- a/sound/soc/sh/rcar/ssi.c
1192 ++++ b/sound/soc/sh/rcar/ssi.c
1193 +@@ -594,10 +594,16 @@ static int rsnd_ssi_stop(struct rsnd_mod *mod,
1194 + * Capture: It might not receave data. Do nothing
1195 + */
1196 + if (rsnd_io_is_play(io)) {
1197 +- rsnd_mod_write(mod, SSICR, cr | EN);
1198 ++ rsnd_mod_write(mod, SSICR, cr | ssi->cr_en);
1199 + rsnd_ssi_status_check(mod, DIRQ);
1200 + }
1201 +
1202 ++ /* In multi-SSI mode, stop is performed by setting ssi0129 in
1203 ++ * SSI_CONTROL to 0 (in rsnd_ssio_stop_gen2). Do nothing here.
1204 ++ */
1205 ++ if (rsnd_ssi_multi_slaves_runtime(io))
1206 ++ return 0;
1207 ++
1208 + /*
1209 + * disable SSI,
1210 + * and, wait idle state
1211 +@@ -737,6 +743,9 @@ static void rsnd_ssi_parent_attach(struct rsnd_mod *mod,
1212 + if (!rsnd_rdai_is_clk_master(rdai))
1213 + return;
1214 +
1215 ++ if (rsnd_ssi_is_multi_slave(mod, io))
1216 ++ return;
1217 ++
1218 + switch (rsnd_mod_id(mod)) {
1219 + case 1:
1220 + case 2:
1221 +diff --git a/sound/soc/sh/rcar/ssiu.c b/sound/soc/sh/rcar/ssiu.c
1222 +index f35d88211887..9c7c3e7539c9 100644
1223 +--- a/sound/soc/sh/rcar/ssiu.c
1224 ++++ b/sound/soc/sh/rcar/ssiu.c
1225 +@@ -221,7 +221,7 @@ static int rsnd_ssiu_init_gen2(struct rsnd_mod *mod,
1226 + i;
1227 +
1228 + for_each_rsnd_mod_array(i, pos, io, rsnd_ssi_array) {
1229 +- shift = (i * 4) + 16;
1230 ++ shift = (i * 4) + 20;
1231 + val = (val & ~(0xF << shift)) |
1232 + rsnd_mod_id(pos) << shift;
1233 + }
1234 +diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
1235 +index a152409e8746..009d65a6fb43 100644
1236 +--- a/sound/soc/soc-topology.c
1237 ++++ b/sound/soc/soc-topology.c
1238 +@@ -894,7 +894,13 @@ static int soc_tplg_dmixer_create(struct soc_tplg *tplg, unsigned int count,
1239 + }
1240 +
1241 + /* create any TLV data */
1242 +- soc_tplg_create_tlv(tplg, &kc, &mc->hdr);
1243 ++ err = soc_tplg_create_tlv(tplg, &kc, &mc->hdr);
1244 ++ if (err < 0) {
1245 ++ dev_err(tplg->dev, "ASoC: failed to create TLV %s\n",
1246 ++ mc->hdr.name);
1247 ++ kfree(sm);
1248 ++ continue;
1249 ++ }
1250 +
1251 + /* pass control to driver for optional further init */
1252 + err = soc_tplg_init_kcontrol(tplg, &kc,
1253 +@@ -1118,6 +1124,7 @@ static int soc_tplg_kcontrol_elems_load(struct soc_tplg *tplg,
1254 + struct snd_soc_tplg_hdr *hdr)
1255 + {
1256 + struct snd_soc_tplg_ctl_hdr *control_hdr;
1257 ++ int ret;
1258 + int i;
1259 +
1260 + if (tplg->pass != SOC_TPLG_PASS_MIXER) {
1261 +@@ -1146,25 +1153,30 @@ static int soc_tplg_kcontrol_elems_load(struct soc_tplg *tplg,
1262 + case SND_SOC_TPLG_CTL_RANGE:
1263 + case SND_SOC_TPLG_DAPM_CTL_VOLSW:
1264 + case SND_SOC_TPLG_DAPM_CTL_PIN:
1265 +- soc_tplg_dmixer_create(tplg, 1,
1266 +- le32_to_cpu(hdr->payload_size));
1267 ++ ret = soc_tplg_dmixer_create(tplg, 1,
1268 ++ le32_to_cpu(hdr->payload_size));
1269 + break;
1270 + case SND_SOC_TPLG_CTL_ENUM:
1271 + case SND_SOC_TPLG_CTL_ENUM_VALUE:
1272 + case SND_SOC_TPLG_DAPM_CTL_ENUM_DOUBLE:
1273 + case SND_SOC_TPLG_DAPM_CTL_ENUM_VIRT:
1274 + case SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE:
1275 +- soc_tplg_denum_create(tplg, 1,
1276 +- le32_to_cpu(hdr->payload_size));
1277 ++ ret = soc_tplg_denum_create(tplg, 1,
1278 ++ le32_to_cpu(hdr->payload_size));
1279 + break;
1280 + case SND_SOC_TPLG_CTL_BYTES:
1281 +- soc_tplg_dbytes_create(tplg, 1,
1282 +- le32_to_cpu(hdr->payload_size));
1283 ++ ret = soc_tplg_dbytes_create(tplg, 1,
1284 ++ le32_to_cpu(hdr->payload_size));
1285 + break;
1286 + default:
1287 + soc_bind_err(tplg, control_hdr, i);
1288 + return -EINVAL;
1289 + }
1290 ++ if (ret < 0) {
1291 ++ dev_err(tplg->dev, "ASoC: invalid control\n");
1292 ++ return ret;
1293 ++ }
1294 ++
1295 + }
1296 +
1297 + return 0;
1298 +@@ -1272,7 +1284,9 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg,
1299 + routes[i]->dobj.index = tplg->index;
1300 + list_add(&routes[i]->dobj.list, &tplg->comp->dobj_list);
1301 +
1302 +- soc_tplg_add_route(tplg, routes[i]);
1303 ++ ret = soc_tplg_add_route(tplg, routes[i]);
1304 ++ if (ret < 0)
1305 ++ break;
1306 +
1307 + /* add route, but keep going if some fail */
1308 + snd_soc_dapm_add_routes(dapm, routes[i], 1);
1309 +@@ -1355,7 +1369,13 @@ static struct snd_kcontrol_new *soc_tplg_dapm_widget_dmixer_create(
1310 + }
1311 +
1312 + /* create any TLV data */
1313 +- soc_tplg_create_tlv(tplg, &kc[i], &mc->hdr);
1314 ++ err = soc_tplg_create_tlv(tplg, &kc[i], &mc->hdr);
1315 ++ if (err < 0) {
1316 ++ dev_err(tplg->dev, "ASoC: failed to create TLV %s\n",
1317 ++ mc->hdr.name);
1318 ++ kfree(sm);
1319 ++ continue;
1320 ++ }
1321 +
1322 + /* pass control to driver for optional further init */
1323 + err = soc_tplg_init_kcontrol(tplg, &kc[i],
1324 +@@ -1766,10 +1786,13 @@ static int soc_tplg_dapm_complete(struct soc_tplg *tplg)
1325 + return 0;
1326 + }
1327 +
1328 +-static void set_stream_info(struct snd_soc_pcm_stream *stream,
1329 ++static int set_stream_info(struct snd_soc_pcm_stream *stream,
1330 + struct snd_soc_tplg_stream_caps *caps)
1331 + {
1332 + stream->stream_name = kstrdup(caps->name, GFP_KERNEL);
1333 ++ if (!stream->stream_name)
1334 ++ return -ENOMEM;
1335 ++
1336 + stream->channels_min = le32_to_cpu(caps->channels_min);
1337 + stream->channels_max = le32_to_cpu(caps->channels_max);
1338 + stream->rates = le32_to_cpu(caps->rates);
1339 +@@ -1777,6 +1800,8 @@ static void set_stream_info(struct snd_soc_pcm_stream *stream,
1340 + stream->rate_max = le32_to_cpu(caps->rate_max);
1341 + stream->formats = le64_to_cpu(caps->formats);
1342 + stream->sig_bits = le32_to_cpu(caps->sig_bits);
1343 ++
1344 ++ return 0;
1345 + }
1346 +
1347 + static void set_dai_flags(struct snd_soc_dai_driver *dai_drv,
1348 +@@ -1812,20 +1837,29 @@ static int soc_tplg_dai_create(struct soc_tplg *tplg,
1349 + if (dai_drv == NULL)
1350 + return -ENOMEM;
1351 +
1352 +- if (strlen(pcm->dai_name))
1353 ++ if (strlen(pcm->dai_name)) {
1354 + dai_drv->name = kstrdup(pcm->dai_name, GFP_KERNEL);
1355 ++ if (!dai_drv->name) {
1356 ++ ret = -ENOMEM;
1357 ++ goto err;
1358 ++ }
1359 ++ }
1360 + dai_drv->id = le32_to_cpu(pcm->dai_id);
1361 +
1362 + if (pcm->playback) {
1363 + stream = &dai_drv->playback;
1364 + caps = &pcm->caps[SND_SOC_TPLG_STREAM_PLAYBACK];
1365 +- set_stream_info(stream, caps);
1366 ++ ret = set_stream_info(stream, caps);
1367 ++ if (ret < 0)
1368 ++ goto err;
1369 + }
1370 +
1371 + if (pcm->capture) {
1372 + stream = &dai_drv->capture;
1373 + caps = &pcm->caps[SND_SOC_TPLG_STREAM_CAPTURE];
1374 +- set_stream_info(stream, caps);
1375 ++ ret = set_stream_info(stream, caps);
1376 ++ if (ret < 0)
1377 ++ goto err;
1378 + }
1379 +
1380 + if (pcm->compress)
1381 +@@ -1835,11 +1869,7 @@ static int soc_tplg_dai_create(struct soc_tplg *tplg,
1382 + ret = soc_tplg_dai_load(tplg, dai_drv, pcm, NULL);
1383 + if (ret < 0) {
1384 + dev_err(tplg->comp->dev, "ASoC: DAI loading failed\n");
1385 +- kfree(dai_drv->playback.stream_name);
1386 +- kfree(dai_drv->capture.stream_name);
1387 +- kfree(dai_drv->name);
1388 +- kfree(dai_drv);
1389 +- return ret;
1390 ++ goto err;
1391 + }
1392 +
1393 + dai_drv->dobj.index = tplg->index;
1394 +@@ -1860,6 +1890,14 @@ static int soc_tplg_dai_create(struct soc_tplg *tplg,
1395 + return ret;
1396 + }
1397 +
1398 ++ return 0;
1399 ++
1400 ++err:
1401 ++ kfree(dai_drv->playback.stream_name);
1402 ++ kfree(dai_drv->capture.stream_name);
1403 ++ kfree(dai_drv->name);
1404 ++ kfree(dai_drv);
1405 ++
1406 + return ret;
1407 + }
1408 +
1409 +@@ -1916,11 +1954,20 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg,
1410 + if (strlen(pcm->pcm_name)) {
1411 + link->name = kstrdup(pcm->pcm_name, GFP_KERNEL);
1412 + link->stream_name = kstrdup(pcm->pcm_name, GFP_KERNEL);
1413 ++ if (!link->name || !link->stream_name) {
1414 ++ ret = -ENOMEM;
1415 ++ goto err;
1416 ++ }
1417 + }
1418 + link->id = le32_to_cpu(pcm->pcm_id);
1419 +
1420 +- if (strlen(pcm->dai_name))
1421 ++ if (strlen(pcm->dai_name)) {
1422 + link->cpus->dai_name = kstrdup(pcm->dai_name, GFP_KERNEL);
1423 ++ if (!link->cpus->dai_name) {
1424 ++ ret = -ENOMEM;
1425 ++ goto err;
1426 ++ }
1427 ++ }
1428 +
1429 + link->codecs->name = "snd-soc-dummy";
1430 + link->codecs->dai_name = "snd-soc-dummy-dai";
1431 +@@ -2088,7 +2135,9 @@ static int soc_tplg_pcm_elems_load(struct soc_tplg *tplg,
1432 + _pcm = pcm;
1433 + } else {
1434 + abi_match = false;
1435 +- pcm_new_ver(tplg, pcm, &_pcm);
1436 ++ ret = pcm_new_ver(tplg, pcm, &_pcm);
1437 ++ if (ret < 0)
1438 ++ return ret;
1439 + }
1440 +
1441 + /* create the FE DAIs and DAI links */
1442 +@@ -2436,13 +2485,17 @@ static int soc_tplg_dai_config(struct soc_tplg *tplg,
1443 + if (d->playback) {
1444 + stream = &dai_drv->playback;
1445 + caps = &d->caps[SND_SOC_TPLG_STREAM_PLAYBACK];
1446 +- set_stream_info(stream, caps);
1447 ++ ret = set_stream_info(stream, caps);
1448 ++ if (ret < 0)
1449 ++ goto err;
1450 + }
1451 +
1452 + if (d->capture) {
1453 + stream = &dai_drv->capture;
1454 + caps = &d->caps[SND_SOC_TPLG_STREAM_CAPTURE];
1455 +- set_stream_info(stream, caps);
1456 ++ ret = set_stream_info(stream, caps);
1457 ++ if (ret < 0)
1458 ++ goto err;
1459 + }
1460 +
1461 + if (d->flag_mask)
1462 +@@ -2454,10 +2507,15 @@ static int soc_tplg_dai_config(struct soc_tplg *tplg,
1463 + ret = soc_tplg_dai_load(tplg, dai_drv, NULL, dai);
1464 + if (ret < 0) {
1465 + dev_err(tplg->comp->dev, "ASoC: DAI loading failed\n");
1466 +- return ret;
1467 ++ goto err;
1468 + }
1469 +
1470 + return 0;
1471 ++
1472 ++err:
1473 ++ kfree(dai_drv->playback.stream_name);
1474 ++ kfree(dai_drv->capture.stream_name);
1475 ++ return ret;
1476 + }
1477 +
1478 + /* load physical DAI elements */
1479 +@@ -2466,7 +2524,7 @@ static int soc_tplg_dai_elems_load(struct soc_tplg *tplg,
1480 + {
1481 + struct snd_soc_tplg_dai *dai;
1482 + int count;
1483 +- int i;
1484 ++ int i, ret;
1485 +
1486 + count = le32_to_cpu(hdr->count);
1487 +
1488 +@@ -2481,7 +2539,12 @@ static int soc_tplg_dai_elems_load(struct soc_tplg *tplg,
1489 + return -EINVAL;
1490 + }
1491 +
1492 +- soc_tplg_dai_config(tplg, dai);
1493 ++ ret = soc_tplg_dai_config(tplg, dai);
1494 ++ if (ret < 0) {
1495 ++ dev_err(tplg->dev, "ASoC: failed to configure DAI\n");
1496 ++ return ret;
1497 ++ }
1498 ++
1499 + tplg->pos += (sizeof(*dai) + le32_to_cpu(dai->priv.size));
1500 + }
1501 +
1502 +@@ -2589,7 +2652,7 @@ static int soc_valid_header(struct soc_tplg *tplg,
1503 + }
1504 +
1505 + /* big endian firmware objects not supported atm */
1506 +- if (hdr->magic == SOC_TPLG_MAGIC_BIG_ENDIAN) {
1507 ++ if (le32_to_cpu(hdr->magic) == SOC_TPLG_MAGIC_BIG_ENDIAN) {
1508 + dev_err(tplg->dev,
1509 + "ASoC: pass %d big endian not supported header got %x at offset 0x%lx size 0x%zx.\n",
1510 + tplg->pass, hdr->magic,
1511 +diff --git a/tools/bpf/runqslower/Makefile b/tools/bpf/runqslower/Makefile
1512 +index 39edd68afa8e..8a6f82e56a24 100644
1513 +--- a/tools/bpf/runqslower/Makefile
1514 ++++ b/tools/bpf/runqslower/Makefile
1515 +@@ -8,7 +8,7 @@ BPFTOOL ?= $(DEFAULT_BPFTOOL)
1516 + LIBBPF_SRC := $(abspath ../../lib/bpf)
1517 + BPFOBJ := $(OUTPUT)/libbpf.a
1518 + BPF_INCLUDE := $(OUTPUT)
1519 +-INCLUDES := -I$(BPF_INCLUDE) -I$(OUTPUT) -I$(abspath ../../lib)
1520 ++INCLUDES := -I$(OUTPUT) -I$(BPF_INCLUDE) -I$(abspath ../../lib)
1521 + CFLAGS := -g -Wall
1522 +
1523 + # Try to detect best kernel BTF source
1524 +diff --git a/tools/testing/selftests/ipc/msgque.c b/tools/testing/selftests/ipc/msgque.c
1525 +index 4c156aeab6b8..5ec4d9e18806 100644
1526 +--- a/tools/testing/selftests/ipc/msgque.c
1527 ++++ b/tools/testing/selftests/ipc/msgque.c
1528 +@@ -137,7 +137,7 @@ int dump_queue(struct msgque_data *msgque)
1529 + for (kern_id = 0; kern_id < 256; kern_id++) {
1530 + ret = msgctl(kern_id, MSG_STAT, &ds);
1531 + if (ret < 0) {
1532 +- if (errno == -EINVAL)
1533 ++ if (errno == EINVAL)
1534 + continue;
1535 + printf("Failed to get stats for IPC queue with id %d\n",
1536 + kern_id);
1537 +diff --git a/tools/testing/selftests/tpm2/test_smoke.sh b/tools/testing/selftests/tpm2/test_smoke.sh
1538 +index b630c7b5950a..8155c2ea7ccb 100755
1539 +--- a/tools/testing/selftests/tpm2/test_smoke.sh
1540 ++++ b/tools/testing/selftests/tpm2/test_smoke.sh
1541 +@@ -1,17 +1,8 @@
1542 + #!/bin/bash
1543 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
1544 +-self.flags = flags
1545 +
1546 +-# Kselftest framework requirement - SKIP code is 4.
1547 +-ksft_skip=4
1548 +-
1549 +-
1550 +-if [ -f /dev/tpm0 ] ; then
1551 +- python -m unittest -v tpm2_tests.SmokeTest
1552 +- python -m unittest -v tpm2_tests.AsyncTest
1553 +-else
1554 +- exit $ksft_skip
1555 +-fi
1556 ++python -m unittest -v tpm2_tests.SmokeTest
1557 ++python -m unittest -v tpm2_tests.AsyncTest
1558 +
1559 + CLEAR_CMD=$(which tpm2_clear)
1560 + if [ -n $CLEAR_CMD ]; then
1561 +diff --git a/tools/testing/selftests/tpm2/test_space.sh b/tools/testing/selftests/tpm2/test_space.sh
1562 +index 180b469c53b4..a6f5e346635e 100755
1563 +--- a/tools/testing/selftests/tpm2/test_space.sh
1564 ++++ b/tools/testing/selftests/tpm2/test_space.sh
1565 +@@ -1,11 +1,4 @@
1566 + #!/bin/bash
1567 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
1568 +
1569 +-# Kselftest framework requirement - SKIP code is 4.
1570 +-ksft_skip=4
1571 +-
1572 +-if [ -f /dev/tpmrm0 ] ; then
1573 +- python -m unittest -v tpm2_tests.SpaceTest
1574 +-else
1575 +- exit $ksft_skip
1576 +-fi
1577 ++python -m unittest -v tpm2_tests.SpaceTest
1578 +diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
1579 +index 7f9a8a8c31da..8074340c6b3a 100644
1580 +--- a/tools/testing/selftests/vm/Makefile
1581 ++++ b/tools/testing/selftests/vm/Makefile
1582 +@@ -1,7 +1,7 @@
1583 + # SPDX-License-Identifier: GPL-2.0
1584 + # Makefile for vm selftests
1585 + uname_M := $(shell uname -m 2>/dev/null || echo not)
1586 +-ARCH ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/')
1587 ++MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/')
1588 +
1589 + CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS)
1590 + LDLIBS = -lrt
1591 +@@ -19,7 +19,7 @@ TEST_GEN_FILES += thuge-gen
1592 + TEST_GEN_FILES += transhuge-stress
1593 + TEST_GEN_FILES += userfaultfd
1594 +
1595 +-ifneq (,$(filter $(ARCH),arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64))
1596 ++ifneq (,$(filter $(MACHINE),arm64 ia64 mips64 parisc64 ppc64 ppc64le riscv64 s390x sh64 sparc64 x86_64))
1597 + TEST_GEN_FILES += va_128TBswitch
1598 + TEST_GEN_FILES += virtual_address_range
1599 + endif
1600 +diff --git a/tools/testing/selftests/vm/run_vmtests b/tools/testing/selftests/vm/run_vmtests
1601 +index f33714843198..6e137c9baa1e 100755
1602 +--- a/tools/testing/selftests/vm/run_vmtests
1603 ++++ b/tools/testing/selftests/vm/run_vmtests
1604 +@@ -59,7 +59,7 @@ else
1605 + fi
1606 +
1607 + #filter 64bit architectures
1608 +-ARCH64STR="arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64"
1609 ++ARCH64STR="arm64 ia64 mips64 parisc64 ppc64 ppc64le riscv64 s390x sh64 sparc64 x86_64"
1610 + if [ -z $ARCH ]; then
1611 + ARCH=`uname -m 2>/dev/null | sed -e 's/aarch64.*/arm64/'`
1612 + fi