Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:5.10 commit in: /
Date: Wed, 18 May 2022 09:48:16
Message-Id: 1652867266.07cf238278a01e2462edd0e487c3803e15a26ead.mpagano@gentoo
1 commit: 07cf238278a01e2462edd0e487c3803e15a26ead
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 18 09:47:46 2022 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Wed May 18 09:47:46 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=07cf2382
7
8 Linux patch 5.10.117
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1116_linux-5.10.117.patch | 1969 +++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 1973 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index 3d86ae35..28820046 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -507,6 +507,10 @@ Patch: 1115_linux-5.10.116.patch
21 From: http://www.kernel.org
22 Desc: Linux 5.10.116
23
24 +Patch: 1116_linux-5.10.117.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 5.10.117
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/1116_linux-5.10.117.patch b/1116_linux-5.10.117.patch
33 new file mode 100644
34 index 00000000..85108d4f
35 --- /dev/null
36 +++ b/1116_linux-5.10.117.patch
37 @@ -0,0 +1,1969 @@
38 +diff --git a/Makefile b/Makefile
39 +index c999de1b6a6b2..8f611d79d5e11 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,7 +1,7 @@
43 + # SPDX-License-Identifier: GPL-2.0
44 + VERSION = 5
45 + PATCHLEVEL = 10
46 +-SUBLEVEL = 116
47 ++SUBLEVEL = 117
48 + EXTRAVERSION =
49 + NAME = Dare mighty things
50 +
51 +diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
52 +index ab2b654084fa3..b13e8a6c14b0b 100644
53 +--- a/arch/arm/include/asm/io.h
54 ++++ b/arch/arm/include/asm/io.h
55 +@@ -442,6 +442,9 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *addr);
56 + extern int valid_phys_addr_range(phys_addr_t addr, size_t size);
57 + extern int valid_mmap_phys_addr_range(unsigned long pfn, size_t size);
58 + extern int devmem_is_allowed(unsigned long pfn);
59 ++extern bool arch_memremap_can_ram_remap(resource_size_t offset, size_t size,
60 ++ unsigned long flags);
61 ++#define arch_memremap_can_ram_remap arch_memremap_can_ram_remap
62 + #endif
63 +
64 + /*
65 +diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
66 +index 80fb5a4a5c050..2660bdfcad4d0 100644
67 +--- a/arch/arm/mm/ioremap.c
68 ++++ b/arch/arm/mm/ioremap.c
69 +@@ -479,3 +479,11 @@ void __init early_ioremap_init(void)
70 + {
71 + early_ioremap_setup();
72 + }
73 ++
74 ++bool arch_memremap_can_ram_remap(resource_size_t offset, size_t size,
75 ++ unsigned long flags)
76 ++{
77 ++ unsigned long pfn = PHYS_PFN(offset);
78 ++
79 ++ return memblock_is_map_memory(pfn);
80 ++}
81 +diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h
82 +index fd172c41df905..5d0d94afc3086 100644
83 +--- a/arch/arm64/include/asm/io.h
84 ++++ b/arch/arm64/include/asm/io.h
85 +@@ -203,4 +203,8 @@ extern int valid_mmap_phys_addr_range(unsigned long pfn, size_t size);
86 +
87 + extern int devmem_is_allowed(unsigned long pfn);
88 +
89 ++extern bool arch_memremap_can_ram_remap(resource_size_t offset, size_t size,
90 ++ unsigned long flags);
91 ++#define arch_memremap_can_ram_remap arch_memremap_can_ram_remap
92 ++
93 + #endif /* __ASM_IO_H */
94 +diff --git a/arch/arm64/mm/ioremap.c b/arch/arm64/mm/ioremap.c
95 +index b5e83c46b23e7..f173a01a0c0ef 100644
96 +--- a/arch/arm64/mm/ioremap.c
97 ++++ b/arch/arm64/mm/ioremap.c
98 +@@ -13,6 +13,7 @@
99 + #include <linux/mm.h>
100 + #include <linux/vmalloc.h>
101 + #include <linux/io.h>
102 ++#include <linux/memblock.h>
103 +
104 + #include <asm/fixmap.h>
105 + #include <asm/tlbflush.h>
106 +@@ -99,3 +100,11 @@ void __init early_ioremap_init(void)
107 + {
108 + early_ioremap_setup();
109 + }
110 ++
111 ++bool arch_memremap_can_ram_remap(resource_size_t offset, size_t size,
112 ++ unsigned long flags)
113 ++{
114 ++ unsigned long pfn = PHYS_PFN(offset);
115 ++
116 ++ return memblock_is_map_memory(pfn);
117 ++}
118 +diff --git a/arch/s390/Makefile b/arch/s390/Makefile
119 +index 92506918da633..a8cb00f30a7c3 100644
120 +--- a/arch/s390/Makefile
121 ++++ b/arch/s390/Makefile
122 +@@ -32,6 +32,16 @@ KBUILD_CFLAGS_DECOMPRESSOR += -fno-stack-protector
123 + KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-disable-warning, address-of-packed-member)
124 + KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g)
125 + KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,))
126 ++
127 ++ifdef CONFIG_CC_IS_GCC
128 ++ ifeq ($(call cc-ifversion, -ge, 1200, y), y)
129 ++ ifeq ($(call cc-ifversion, -lt, 1300, y), y)
130 ++ KBUILD_CFLAGS += $(call cc-disable-warning, array-bounds)
131 ++ KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-disable-warning, array-bounds)
132 ++ endif
133 ++ endif
134 ++endif
135 ++
136 + UTS_MACHINE := s390x
137 + STACK_SIZE := $(if $(CONFIG_KASAN),65536,16384)
138 + CHECKFLAGS += -D__s390__ -D__s390x__
139 +diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c
140 +index 1372f40d0371f..a4dd500bc141a 100644
141 +--- a/drivers/base/firmware_loader/main.c
142 ++++ b/drivers/base/firmware_loader/main.c
143 +@@ -793,6 +793,8 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
144 + size_t offset, u32 opt_flags)
145 + {
146 + struct firmware *fw = NULL;
147 ++ struct cred *kern_cred = NULL;
148 ++ const struct cred *old_cred;
149 + bool nondirect = false;
150 + int ret;
151 +
152 +@@ -809,6 +811,18 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
153 + if (ret <= 0) /* error or already assigned */
154 + goto out;
155 +
156 ++ /*
157 ++ * We are about to try to access the firmware file. Because we may have been
158 ++ * called by a driver when serving an unrelated request from userland, we use
159 ++ * the kernel credentials to read the file.
160 ++ */
161 ++ kern_cred = prepare_kernel_cred(NULL);
162 ++ if (!kern_cred) {
163 ++ ret = -ENOMEM;
164 ++ goto out;
165 ++ }
166 ++ old_cred = override_creds(kern_cred);
167 ++
168 + ret = fw_get_filesystem_firmware(device, fw->priv, "", NULL);
169 +
170 + /* Only full reads can support decompression, platform, and sysfs. */
171 +@@ -834,6 +848,9 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
172 + } else
173 + ret = assign_fw(fw, device);
174 +
175 ++ revert_creds(old_cred);
176 ++ put_cred(kern_cred);
177 ++
178 + out:
179 + if (ret < 0) {
180 + fw_abort_batch_reqs(fw);
181 +diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c
182 +index c7a94c94dbf37..f2f3280c3a50e 100644
183 +--- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
184 ++++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
185 +@@ -51,8 +51,9 @@ static bool
186 + nouveau_get_backlight_name(char backlight_name[BL_NAME_SIZE],
187 + struct nouveau_backlight *bl)
188 + {
189 +- const int nb = ida_simple_get(&bl_ida, 0, 0, GFP_KERNEL);
190 +- if (nb < 0 || nb >= 100)
191 ++ const int nb = ida_alloc_max(&bl_ida, 99, GFP_KERNEL);
192 ++
193 ++ if (nb < 0)
194 + return false;
195 + if (nb > 0)
196 + snprintf(backlight_name, BL_NAME_SIZE, "nv_backlight%d", nb);
197 +@@ -280,7 +281,7 @@ nouveau_backlight_init(struct drm_connector *connector)
198 + nv_encoder, ops, &props);
199 + if (IS_ERR(bl->dev)) {
200 + if (bl->id >= 0)
201 +- ida_simple_remove(&bl_ida, bl->id);
202 ++ ida_free(&bl_ida, bl->id);
203 + ret = PTR_ERR(bl->dev);
204 + goto fail_alloc;
205 + }
206 +@@ -306,7 +307,7 @@ nouveau_backlight_fini(struct drm_connector *connector)
207 + return;
208 +
209 + if (bl->id >= 0)
210 +- ida_simple_remove(&bl_ida, bl->id);
211 ++ ida_free(&bl_ida, bl->id);
212 +
213 + backlight_device_unregister(bl->dev);
214 + nv_conn->backlight = NULL;
215 +diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
216 +index d0d52c1d4aee0..950a3de3e1166 100644
217 +--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
218 ++++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
219 +@@ -123,7 +123,7 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
220 +
221 + mutex_init(&tdev->iommu.mutex);
222 +
223 +- if (iommu_present(&platform_bus_type)) {
224 ++ if (device_iommu_mapped(dev)) {
225 + tdev->iommu.domain = iommu_domain_alloc(&platform_bus_type);
226 + if (!tdev->iommu.domain)
227 + goto error;
228 +diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
229 +index c59806d40e15b..97d9d2557447b 100644
230 +--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
231 ++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
232 +@@ -498,7 +498,7 @@ static int vmw_fb_kms_detach(struct vmw_fb_par *par,
233 +
234 + static int vmw_fb_kms_framebuffer(struct fb_info *info)
235 + {
236 +- struct drm_mode_fb_cmd2 mode_cmd;
237 ++ struct drm_mode_fb_cmd2 mode_cmd = {0};
238 + struct vmw_fb_par *par = info->par;
239 + struct fb_var_screeninfo *var = &info->var;
240 + struct drm_framebuffer *cur_fb;
241 +diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
242 +index 0c2b032ee6176..f741c7492ee40 100644
243 +--- a/drivers/hwmon/Kconfig
244 ++++ b/drivers/hwmon/Kconfig
245 +@@ -922,7 +922,7 @@ config SENSORS_LTC4261
246 +
247 + config SENSORS_LTQ_CPUTEMP
248 + bool "Lantiq cpu temperature sensor driver"
249 +- depends on LANTIQ
250 ++ depends on SOC_XWAY
251 + help
252 + If you say yes here you get support for the temperature
253 + sensor inside your CPU.
254 +diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c
255 +index 4dec793fd07d5..94b35723ee7ad 100644
256 +--- a/drivers/hwmon/f71882fg.c
257 ++++ b/drivers/hwmon/f71882fg.c
258 +@@ -1577,8 +1577,9 @@ static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
259 + temp *= 125;
260 + if (sign)
261 + temp -= 128000;
262 +- } else
263 +- temp = data->temp[nr] * 1000;
264 ++ } else {
265 ++ temp = ((s8)data->temp[nr]) * 1000;
266 ++ }
267 +
268 + return sprintf(buf, "%d\n", temp);
269 + }
270 +diff --git a/drivers/hwmon/tmp401.c b/drivers/hwmon/tmp401.c
271 +index 9dc210b55e69b..48466b0a4bb05 100644
272 +--- a/drivers/hwmon/tmp401.c
273 ++++ b/drivers/hwmon/tmp401.c
274 +@@ -730,10 +730,21 @@ static int tmp401_probe(struct i2c_client *client)
275 + return 0;
276 + }
277 +
278 ++static const struct of_device_id __maybe_unused tmp4xx_of_match[] = {
279 ++ { .compatible = "ti,tmp401", },
280 ++ { .compatible = "ti,tmp411", },
281 ++ { .compatible = "ti,tmp431", },
282 ++ { .compatible = "ti,tmp432", },
283 ++ { .compatible = "ti,tmp435", },
284 ++ { },
285 ++};
286 ++MODULE_DEVICE_TABLE(of, tmp4xx_of_match);
287 ++
288 + static struct i2c_driver tmp401_driver = {
289 + .class = I2C_CLASS_HWMON,
290 + .driver = {
291 + .name = "tmp401",
292 ++ .of_match_table = of_match_ptr(tmp4xx_of_match),
293 + },
294 + .probe_new = tmp401_probe,
295 + .id_table = tmp401_id,
296 +diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
297 +index 08a675a5328d7..b712b4f27efd9 100644
298 +--- a/drivers/net/dsa/bcm_sf2.c
299 ++++ b/drivers/net/dsa/bcm_sf2.c
300 +@@ -710,6 +710,9 @@ static void bcm_sf2_sw_mac_link_down(struct dsa_switch *ds, int port,
301 + struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
302 + u32 reg, offset;
303 +
304 ++ if (priv->wol_ports_mask & BIT(port))
305 ++ return;
306 ++
307 + if (port != core_readl(priv, CORE_IMP0_PRT_ID)) {
308 + if (priv->type == BCM7445_DEVICE_ID)
309 + offset = CORE_STS_OVERRIDE_GMIIP_PORT(port);
310 +diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
311 +index bdfd462c74db9..fc5ea434a27c9 100644
312 +--- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
313 ++++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
314 +@@ -455,7 +455,7 @@ static int aq_pm_freeze(struct device *dev)
315 +
316 + static int aq_pm_suspend_poweroff(struct device *dev)
317 + {
318 +- return aq_suspend_common(dev, false);
319 ++ return aq_suspend_common(dev, true);
320 + }
321 +
322 + static int aq_pm_thaw(struct device *dev)
323 +@@ -465,7 +465,7 @@ static int aq_pm_thaw(struct device *dev)
324 +
325 + static int aq_pm_resume_restore(struct device *dev)
326 + {
327 +- return atl_resume_common(dev, false);
328 ++ return atl_resume_common(dev, true);
329 + }
330 +
331 + static const struct dev_pm_ops aq_pm_ops = {
332 +diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
333 +index 9ffdaa84ba124..e0a6a2e62d23b 100644
334 +--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
335 ++++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
336 +@@ -3946,6 +3946,10 @@ static int bcmgenet_probe(struct platform_device *pdev)
337 + goto err;
338 + }
339 + priv->wol_irq = platform_get_irq_optional(pdev, 2);
340 ++ if (priv->wol_irq == -EPROBE_DEFER) {
341 ++ err = priv->wol_irq;
342 ++ goto err;
343 ++ }
344 +
345 + priv->base = devm_platform_ioremap_resource(pdev, 0);
346 + if (IS_ERR(priv->base)) {
347 +diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
348 +index bd18a780a0008..4a18a7c7dd4c2 100644
349 +--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
350 ++++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
351 +@@ -7175,42 +7175,43 @@ static void i40e_free_macvlan_channels(struct i40e_vsi *vsi)
352 + static int i40e_fwd_ring_up(struct i40e_vsi *vsi, struct net_device *vdev,
353 + struct i40e_fwd_adapter *fwd)
354 + {
355 ++ struct i40e_channel *ch = NULL, *ch_tmp, *iter;
356 + int ret = 0, num_tc = 1, i, aq_err;
357 +- struct i40e_channel *ch, *ch_tmp;
358 + struct i40e_pf *pf = vsi->back;
359 + struct i40e_hw *hw = &pf->hw;
360 +
361 +- if (list_empty(&vsi->macvlan_list))
362 +- return -EINVAL;
363 +-
364 + /* Go through the list and find an available channel */
365 +- list_for_each_entry_safe(ch, ch_tmp, &vsi->macvlan_list, list) {
366 +- if (!i40e_is_channel_macvlan(ch)) {
367 +- ch->fwd = fwd;
368 ++ list_for_each_entry_safe(iter, ch_tmp, &vsi->macvlan_list, list) {
369 ++ if (!i40e_is_channel_macvlan(iter)) {
370 ++ iter->fwd = fwd;
371 + /* record configuration for macvlan interface in vdev */
372 + for (i = 0; i < num_tc; i++)
373 + netdev_bind_sb_channel_queue(vsi->netdev, vdev,
374 + i,
375 +- ch->num_queue_pairs,
376 +- ch->base_queue);
377 +- for (i = 0; i < ch->num_queue_pairs; i++) {
378 ++ iter->num_queue_pairs,
379 ++ iter->base_queue);
380 ++ for (i = 0; i < iter->num_queue_pairs; i++) {
381 + struct i40e_ring *tx_ring, *rx_ring;
382 + u16 pf_q;
383 +
384 +- pf_q = ch->base_queue + i;
385 ++ pf_q = iter->base_queue + i;
386 +
387 + /* Get to TX ring ptr */
388 + tx_ring = vsi->tx_rings[pf_q];
389 +- tx_ring->ch = ch;
390 ++ tx_ring->ch = iter;
391 +
392 + /* Get the RX ring ptr */
393 + rx_ring = vsi->rx_rings[pf_q];
394 +- rx_ring->ch = ch;
395 ++ rx_ring->ch = iter;
396 + }
397 ++ ch = iter;
398 + break;
399 + }
400 + }
401 +
402 ++ if (!ch)
403 ++ return -EINVAL;
404 ++
405 + /* Guarantee all rings are updated before we update the
406 + * MAC address filter.
407 + */
408 +diff --git a/drivers/net/ethernet/mscc/ocelot_flower.c b/drivers/net/ethernet/mscc/ocelot_flower.c
409 +index c4c4649b2088e..b221b83ec5a6f 100644
410 +--- a/drivers/net/ethernet/mscc/ocelot_flower.c
411 ++++ b/drivers/net/ethernet/mscc/ocelot_flower.c
412 +@@ -206,9 +206,10 @@ static int ocelot_flower_parse_action(struct ocelot *ocelot, int port,
413 + filter->type = OCELOT_VCAP_FILTER_OFFLOAD;
414 + break;
415 + case FLOW_ACTION_TRAP:
416 +- if (filter->block_id != VCAP_IS2) {
417 ++ if (filter->block_id != VCAP_IS2 ||
418 ++ filter->lookup != 0) {
419 + NL_SET_ERR_MSG_MOD(extack,
420 +- "Trap action can only be offloaded to VCAP IS2");
421 ++ "Trap action can only be offloaded to VCAP IS2 lookup 0");
422 + return -EOPNOTSUPP;
423 + }
424 + if (filter->goto_target != -1) {
425 +diff --git a/drivers/net/ethernet/mscc/ocelot_vcap.c b/drivers/net/ethernet/mscc/ocelot_vcap.c
426 +index d8c778ee6f1b8..1185725906073 100644
427 +--- a/drivers/net/ethernet/mscc/ocelot_vcap.c
428 ++++ b/drivers/net/ethernet/mscc/ocelot_vcap.c
429 +@@ -373,7 +373,6 @@ static void is2_entry_set(struct ocelot *ocelot, int ix,
430 + OCELOT_VCAP_BIT_0);
431 + vcap_key_set(vcap, &data, VCAP_IS2_HK_IGR_PORT_MASK, 0,
432 + ~filter->ingress_port_mask);
433 +- vcap_key_bit_set(vcap, &data, VCAP_IS2_HK_FIRST, OCELOT_VCAP_BIT_ANY);
434 + vcap_key_bit_set(vcap, &data, VCAP_IS2_HK_HOST_MATCH,
435 + OCELOT_VCAP_BIT_ANY);
436 + vcap_key_bit_set(vcap, &data, VCAP_IS2_HK_L2_MC, filter->dmac_mc);
437 +@@ -1143,6 +1142,8 @@ int ocelot_vcap_filter_add(struct ocelot *ocelot,
438 + struct ocelot_vcap_filter *tmp;
439 +
440 + tmp = ocelot_vcap_block_find_filter_by_index(block, i);
441 ++ /* Read back the filter's counters before moving it */
442 ++ vcap_entry_get(ocelot, i - 1, tmp);
443 + vcap_entry_set(ocelot, i, tmp);
444 + }
445 +
446 +@@ -1181,7 +1182,11 @@ int ocelot_vcap_filter_del(struct ocelot *ocelot,
447 + struct ocelot_vcap_filter del_filter;
448 + int i, index;
449 +
450 ++ /* Need to inherit the block_id so that vcap_entry_set()
451 ++ * does not get confused and knows where to install it.
452 ++ */
453 + memset(&del_filter, 0, sizeof(del_filter));
454 ++ del_filter.block_id = filter->block_id;
455 +
456 + /* Gets index of the filter */
457 + index = ocelot_vcap_block_get_filter_index(block, filter);
458 +@@ -1196,6 +1201,8 @@ int ocelot_vcap_filter_del(struct ocelot *ocelot,
459 + struct ocelot_vcap_filter *tmp;
460 +
461 + tmp = ocelot_vcap_block_find_filter_by_index(block, i);
462 ++ /* Read back the filter's counters before moving it */
463 ++ vcap_entry_get(ocelot, i + 1, tmp);
464 + vcap_entry_set(ocelot, i, tmp);
465 + }
466 +
467 +diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
468 +index b0d8499d373bd..31fbe8904222b 100644
469 +--- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
470 ++++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
471 +@@ -251,7 +251,7 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
472 +
473 + err = ionic_map_bars(ionic);
474 + if (err)
475 +- goto err_out_pci_disable_device;
476 ++ goto err_out_pci_release_regions;
477 +
478 + /* Configure the device */
479 + err = ionic_setup(ionic);
480 +@@ -353,6 +353,7 @@ err_out_teardown:
481 +
482 + err_out_unmap_bars:
483 + ionic_unmap_bars(ionic);
484 ++err_out_pci_release_regions:
485 + pci_release_regions(pdev);
486 + err_out_pci_disable_device:
487 + pci_disable_device(pdev);
488 +diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
489 +index 4fa72b573c172..6f950979d25e4 100644
490 +--- a/drivers/net/ethernet/sfc/ef10.c
491 ++++ b/drivers/net/ethernet/sfc/ef10.c
492 +@@ -3563,6 +3563,11 @@ static int efx_ef10_mtd_probe(struct efx_nic *efx)
493 + n_parts++;
494 + }
495 +
496 ++ if (!n_parts) {
497 ++ kfree(parts);
498 ++ return 0;
499 ++ }
500 ++
501 + rc = efx_mtd_add(efx, &parts[0].common, n_parts, sizeof(*parts));
502 + fail:
503 + if (rc)
504 +diff --git a/drivers/net/ethernet/sfc/efx_channels.c b/drivers/net/ethernet/sfc/efx_channels.c
505 +index 0a8799a208cf4..2ab8571ef1cc0 100644
506 +--- a/drivers/net/ethernet/sfc/efx_channels.c
507 ++++ b/drivers/net/ethernet/sfc/efx_channels.c
508 +@@ -744,7 +744,9 @@ void efx_remove_channels(struct efx_nic *efx)
509 +
510 + int efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries)
511 + {
512 +- struct efx_channel *other_channel[EFX_MAX_CHANNELS], *channel;
513 ++ struct efx_channel *other_channel[EFX_MAX_CHANNELS], *channel,
514 ++ *ptp_channel = efx_ptp_channel(efx);
515 ++ struct efx_ptp_data *ptp_data = efx->ptp_data;
516 + unsigned int i, next_buffer_table = 0;
517 + u32 old_rxq_entries, old_txq_entries;
518 + int rc, rc2;
519 +@@ -797,11 +799,8 @@ int efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries)
520 + old_txq_entries = efx->txq_entries;
521 + efx->rxq_entries = rxq_entries;
522 + efx->txq_entries = txq_entries;
523 +- for (i = 0; i < efx->n_channels; i++) {
524 +- channel = efx->channel[i];
525 +- efx->channel[i] = other_channel[i];
526 +- other_channel[i] = channel;
527 +- }
528 ++ for (i = 0; i < efx->n_channels; i++)
529 ++ swap(efx->channel[i], other_channel[i]);
530 +
531 + /* Restart buffer table allocation */
532 + efx->next_buffer_table = next_buffer_table;
533 +@@ -817,6 +816,7 @@ int efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries)
534 + }
535 +
536 + out:
537 ++ efx->ptp_data = NULL;
538 + /* Destroy unused channel structures */
539 + for (i = 0; i < efx->n_channels; i++) {
540 + channel = other_channel[i];
541 +@@ -827,6 +827,7 @@ out:
542 + }
543 + }
544 +
545 ++ efx->ptp_data = ptp_data;
546 + rc2 = efx_soft_enable_interrupts(efx);
547 + if (rc2) {
548 + rc = rc ? rc : rc2;
549 +@@ -843,11 +844,9 @@ rollback:
550 + /* Swap back */
551 + efx->rxq_entries = old_rxq_entries;
552 + efx->txq_entries = old_txq_entries;
553 +- for (i = 0; i < efx->n_channels; i++) {
554 +- channel = efx->channel[i];
555 +- efx->channel[i] = other_channel[i];
556 +- other_channel[i] = channel;
557 +- }
558 ++ for (i = 0; i < efx->n_channels; i++)
559 ++ swap(efx->channel[i], other_channel[i]);
560 ++ efx_ptp_update_channel(efx, ptp_channel);
561 + goto out;
562 + }
563 +
564 +diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c
565 +index 797e51802ccbb..725b0f38813a9 100644
566 +--- a/drivers/net/ethernet/sfc/ptp.c
567 ++++ b/drivers/net/ethernet/sfc/ptp.c
568 +@@ -45,6 +45,7 @@
569 + #include "farch_regs.h"
570 + #include "tx.h"
571 + #include "nic.h" /* indirectly includes ptp.h */
572 ++#include "efx_channels.h"
573 +
574 + /* Maximum number of events expected to make up a PTP event */
575 + #define MAX_EVENT_FRAGS 3
576 +@@ -541,6 +542,12 @@ struct efx_channel *efx_ptp_channel(struct efx_nic *efx)
577 + return efx->ptp_data ? efx->ptp_data->channel : NULL;
578 + }
579 +
580 ++void efx_ptp_update_channel(struct efx_nic *efx, struct efx_channel *channel)
581 ++{
582 ++ if (efx->ptp_data)
583 ++ efx->ptp_data->channel = channel;
584 ++}
585 ++
586 + static u32 last_sync_timestamp_major(struct efx_nic *efx)
587 + {
588 + struct efx_channel *channel = efx_ptp_channel(efx);
589 +@@ -1443,6 +1450,11 @@ int efx_ptp_probe(struct efx_nic *efx, struct efx_channel *channel)
590 + int rc = 0;
591 + unsigned int pos;
592 +
593 ++ if (efx->ptp_data) {
594 ++ efx->ptp_data->channel = channel;
595 ++ return 0;
596 ++ }
597 ++
598 + ptp = kzalloc(sizeof(struct efx_ptp_data), GFP_KERNEL);
599 + efx->ptp_data = ptp;
600 + if (!efx->ptp_data)
601 +@@ -2179,7 +2191,7 @@ static const struct efx_channel_type efx_ptp_channel_type = {
602 + .pre_probe = efx_ptp_probe_channel,
603 + .post_remove = efx_ptp_remove_channel,
604 + .get_name = efx_ptp_get_channel_name,
605 +- /* no copy operation; there is no need to reallocate this channel */
606 ++ .copy = efx_copy_channel,
607 + .receive_skb = efx_ptp_rx,
608 + .want_txqs = efx_ptp_want_txqs,
609 + .keep_eventq = false,
610 +diff --git a/drivers/net/ethernet/sfc/ptp.h b/drivers/net/ethernet/sfc/ptp.h
611 +index 9855e8c9e544d..7b1ef7002b3f0 100644
612 +--- a/drivers/net/ethernet/sfc/ptp.h
613 ++++ b/drivers/net/ethernet/sfc/ptp.h
614 +@@ -16,6 +16,7 @@ struct ethtool_ts_info;
615 + int efx_ptp_probe(struct efx_nic *efx, struct efx_channel *channel);
616 + void efx_ptp_defer_probe_with_channel(struct efx_nic *efx);
617 + struct efx_channel *efx_ptp_channel(struct efx_nic *efx);
618 ++void efx_ptp_update_channel(struct efx_nic *efx, struct efx_channel *channel);
619 + void efx_ptp_remove(struct efx_nic *efx);
620 + int efx_ptp_set_ts_config(struct efx_nic *efx, struct ifreq *ifr);
621 + int efx_ptp_get_ts_config(struct efx_nic *efx, struct ifreq *ifr);
622 +diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
623 +index e29b5523b19bd..f6ea4a0ad5dff 100644
624 +--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
625 ++++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
626 +@@ -932,8 +932,6 @@ static int xemaclite_open(struct net_device *dev)
627 + xemaclite_disable_interrupts(lp);
628 +
629 + if (lp->phy_node) {
630 +- u32 bmcr;
631 +-
632 + lp->phy_dev = of_phy_connect(lp->ndev, lp->phy_node,
633 + xemaclite_adjust_link, 0,
634 + PHY_INTERFACE_MODE_MII);
635 +@@ -944,19 +942,6 @@ static int xemaclite_open(struct net_device *dev)
636 +
637 + /* EmacLite doesn't support giga-bit speeds */
638 + phy_set_max_speed(lp->phy_dev, SPEED_100);
639 +-
640 +- /* Don't advertise 1000BASE-T Full/Half duplex speeds */
641 +- phy_write(lp->phy_dev, MII_CTRL1000, 0);
642 +-
643 +- /* Advertise only 10 and 100mbps full/half duplex speeds */
644 +- phy_write(lp->phy_dev, MII_ADVERTISE, ADVERTISE_ALL |
645 +- ADVERTISE_CSMA);
646 +-
647 +- /* Restart auto negotiation */
648 +- bmcr = phy_read(lp->phy_dev, MII_BMCR);
649 +- bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART);
650 +- phy_write(lp->phy_dev, MII_BMCR, bmcr);
651 +-
652 + phy_start(lp->phy_dev);
653 + }
654 +
655 +diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
656 +index db7866b6f7525..18e67eb6d8b4f 100644
657 +--- a/drivers/net/phy/phy.c
658 ++++ b/drivers/net/phy/phy.c
659 +@@ -124,10 +124,15 @@ EXPORT_SYMBOL(phy_print_status);
660 + */
661 + static int phy_clear_interrupt(struct phy_device *phydev)
662 + {
663 +- if (phydev->drv->ack_interrupt)
664 +- return phydev->drv->ack_interrupt(phydev);
665 ++ int ret = 0;
666 +
667 +- return 0;
668 ++ if (phydev->drv->ack_interrupt) {
669 ++ mutex_lock(&phydev->lock);
670 ++ ret = phydev->drv->ack_interrupt(phydev);
671 ++ mutex_unlock(&phydev->lock);
672 ++ }
673 ++
674 ++ return ret;
675 + }
676 +
677 + /**
678 +@@ -981,6 +986,36 @@ int phy_disable_interrupts(struct phy_device *phydev)
679 + return phy_clear_interrupt(phydev);
680 + }
681 +
682 ++/**
683 ++ * phy_did_interrupt - Checks if the PHY generated an interrupt
684 ++ * @phydev: target phy_device struct
685 ++ */
686 ++static int phy_did_interrupt(struct phy_device *phydev)
687 ++{
688 ++ int ret;
689 ++
690 ++ mutex_lock(&phydev->lock);
691 ++ ret = phydev->drv->did_interrupt(phydev);
692 ++ mutex_unlock(&phydev->lock);
693 ++
694 ++ return ret;
695 ++}
696 ++
697 ++/**
698 ++ * phy_handle_interrupt - Handle PHY interrupt
699 ++ * @phydev: target phy_device struct
700 ++ */
701 ++static irqreturn_t phy_handle_interrupt(struct phy_device *phydev)
702 ++{
703 ++ irqreturn_t ret;
704 ++
705 ++ mutex_lock(&phydev->lock);
706 ++ ret = phydev->drv->handle_interrupt(phydev);
707 ++ mutex_unlock(&phydev->lock);
708 ++
709 ++ return ret;
710 ++}
711 ++
712 + /**
713 + * phy_interrupt - PHY interrupt handler
714 + * @irq: interrupt line
715 +@@ -994,9 +1029,9 @@ static irqreturn_t phy_interrupt(int irq, void *phy_dat)
716 + struct phy_driver *drv = phydev->drv;
717 +
718 + if (drv->handle_interrupt)
719 +- return drv->handle_interrupt(phydev);
720 ++ return phy_handle_interrupt(phydev);
721 +
722 +- if (drv->did_interrupt && !drv->did_interrupt(phydev))
723 ++ if (drv->did_interrupt && !phy_did_interrupt(phydev))
724 + return IRQ_NONE;
725 +
726 + /* reschedule state queue work to run as soon as possible */
727 +diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
728 +index efffa65f82143..96068e0d841ae 100644
729 +--- a/drivers/net/phy/sfp.c
730 ++++ b/drivers/net/phy/sfp.c
731 +@@ -249,6 +249,7 @@ struct sfp {
732 + struct sfp_eeprom_id id;
733 + unsigned int module_power_mW;
734 + unsigned int module_t_start_up;
735 ++ bool tx_fault_ignore;
736 +
737 + #if IS_ENABLED(CONFIG_HWMON)
738 + struct sfp_diag diag;
739 +@@ -1893,6 +1894,12 @@ static int sfp_sm_mod_probe(struct sfp *sfp, bool report)
740 + else
741 + sfp->module_t_start_up = T_START_UP;
742 +
743 ++ if (!memcmp(id.base.vendor_name, "HUAWEI ", 16) &&
744 ++ !memcmp(id.base.vendor_pn, "MA5671A ", 16))
745 ++ sfp->tx_fault_ignore = true;
746 ++ else
747 ++ sfp->tx_fault_ignore = false;
748 ++
749 + return 0;
750 + }
751 +
752 +@@ -2320,7 +2327,10 @@ static void sfp_check_state(struct sfp *sfp)
753 + mutex_lock(&sfp->st_mutex);
754 + state = sfp_get_state(sfp);
755 + changed = state ^ sfp->state;
756 +- changed &= SFP_F_PRESENT | SFP_F_LOS | SFP_F_TX_FAULT;
757 ++ if (sfp->tx_fault_ignore)
758 ++ changed &= SFP_F_PRESENT | SFP_F_LOS;
759 ++ else
760 ++ changed &= SFP_F_PRESENT | SFP_F_LOS | SFP_F_TX_FAULT;
761 +
762 + for (i = 0; i < GPIO_MAX; i++)
763 + if (changed & BIT(i))
764 +diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
765 +index fcad5cdcabfa4..3c931b1b2a0bb 100644
766 +--- a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
767 ++++ b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
768 +@@ -367,7 +367,7 @@ void iwl_dbg_tlv_del_timers(struct iwl_trans *trans)
769 + struct iwl_dbg_tlv_timer_node *node, *tmp;
770 +
771 + list_for_each_entry_safe(node, tmp, timer_list, list) {
772 +- del_timer(&node->timer);
773 ++ del_timer_sync(&node->timer);
774 + list_del(&node->list);
775 + kfree(node);
776 + }
777 +diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
778 +index cc550ba0c9dfe..afd2d5add04b1 100644
779 +--- a/drivers/net/wireless/mac80211_hwsim.c
780 ++++ b/drivers/net/wireless/mac80211_hwsim.c
781 +@@ -2264,11 +2264,13 @@ static void hw_scan_work(struct work_struct *work)
782 + if (req->ie_len)
783 + skb_put_data(probe, req->ie, req->ie_len);
784 +
785 ++ rcu_read_lock();
786 + if (!ieee80211_tx_prepare_skb(hwsim->hw,
787 + hwsim->hw_scan_vif,
788 + probe,
789 + hwsim->tmp_chan->band,
790 + NULL)) {
791 ++ rcu_read_unlock();
792 + kfree_skb(probe);
793 + continue;
794 + }
795 +@@ -2276,6 +2278,7 @@ static void hw_scan_work(struct work_struct *work)
796 + local_bh_disable();
797 + mac80211_hwsim_tx_frame(hwsim->hw, probe,
798 + hwsim->tmp_chan);
799 ++ rcu_read_unlock();
800 + local_bh_enable();
801 + }
802 + }
803 +diff --git a/drivers/s390/net/ctcm_mpc.c b/drivers/s390/net/ctcm_mpc.c
804 +index 85a1a4533cbeb..20a6097e1b204 100644
805 +--- a/drivers/s390/net/ctcm_mpc.c
806 ++++ b/drivers/s390/net/ctcm_mpc.c
807 +@@ -626,8 +626,6 @@ static void mpc_rcvd_sweep_resp(struct mpcg_info *mpcginfo)
808 + ctcm_clear_busy_do(dev);
809 + }
810 +
811 +- kfree(mpcginfo);
812 +-
813 + return;
814 +
815 + }
816 +@@ -1206,10 +1204,10 @@ static void ctcmpc_unpack_skb(struct channel *ch, struct sk_buff *pskb)
817 + CTCM_FUNTAIL, dev->name);
818 + priv->stats.rx_dropped++;
819 + /* mpcginfo only used for non-data transfers */
820 +- kfree(mpcginfo);
821 + if (do_debug_data)
822 + ctcmpc_dump_skb(pskb, -8);
823 + }
824 ++ kfree(mpcginfo);
825 + }
826 + done:
827 +
828 +@@ -1991,7 +1989,6 @@ static void mpc_action_rcvd_xid0(fsm_instance *fsm, int event, void *arg)
829 + }
830 + break;
831 + }
832 +- kfree(mpcginfo);
833 +
834 + CTCM_PR_DEBUG("ctcmpc:%s() %s xid2:%i xid7:%i xidt_p2:%i \n",
835 + __func__, ch->id, grp->outstanding_xid2,
836 +@@ -2052,7 +2049,6 @@ static void mpc_action_rcvd_xid7(fsm_instance *fsm, int event, void *arg)
837 + mpc_validate_xid(mpcginfo);
838 + break;
839 + }
840 +- kfree(mpcginfo);
841 + return;
842 + }
843 +
844 +diff --git a/drivers/s390/net/ctcm_sysfs.c b/drivers/s390/net/ctcm_sysfs.c
845 +index ded1930a00b2d..e3813a7aa5e68 100644
846 +--- a/drivers/s390/net/ctcm_sysfs.c
847 ++++ b/drivers/s390/net/ctcm_sysfs.c
848 +@@ -39,11 +39,12 @@ static ssize_t ctcm_buffer_write(struct device *dev,
849 + struct ctcm_priv *priv = dev_get_drvdata(dev);
850 + int rc;
851 +
852 +- ndev = priv->channel[CTCM_READ]->netdev;
853 +- if (!(priv && priv->channel[CTCM_READ] && ndev)) {
854 ++ if (!(priv && priv->channel[CTCM_READ] &&
855 ++ priv->channel[CTCM_READ]->netdev)) {
856 + CTCM_DBF_TEXT(SETUP, CTC_DBF_ERROR, "bfnondev");
857 + return -ENODEV;
858 + }
859 ++ ndev = priv->channel[CTCM_READ]->netdev;
860 +
861 + rc = kstrtouint(buf, 0, &bs1);
862 + if (rc)
863 +diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c
864 +index 440219bcaa2be..06a322bdced6d 100644
865 +--- a/drivers/s390/net/lcs.c
866 ++++ b/drivers/s390/net/lcs.c
867 +@@ -1735,10 +1735,11 @@ lcs_get_control(struct lcs_card *card, struct lcs_cmd *cmd)
868 + lcs_schedule_recovery(card);
869 + break;
870 + case LCS_CMD_STOPLAN:
871 +- pr_warn("Stoplan for %s initiated by LGW\n",
872 +- card->dev->name);
873 +- if (card->dev)
874 ++ if (card->dev) {
875 ++ pr_warn("Stoplan for %s initiated by LGW\n",
876 ++ card->dev->name);
877 + netif_carrier_off(card->dev);
878 ++ }
879 + break;
880 + default:
881 + LCS_DBF_TEXT(5, trace, "noLGWcmd");
882 +diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c
883 +index f04b961b96cd4..ec58091fc948a 100644
884 +--- a/drivers/slimbus/qcom-ctrl.c
885 ++++ b/drivers/slimbus/qcom-ctrl.c
886 +@@ -510,9 +510,9 @@ static int qcom_slim_probe(struct platform_device *pdev)
887 + }
888 +
889 + ctrl->irq = platform_get_irq(pdev, 0);
890 +- if (!ctrl->irq) {
891 ++ if (ctrl->irq < 0) {
892 + dev_err(&pdev->dev, "no slimbus IRQ\n");
893 +- return -ENODEV;
894 ++ return ctrl->irq;
895 + }
896 +
897 + sctrl = &ctrl->ctrl;
898 +diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
899 +index aafc3bb60e52a..b05b7862778c5 100644
900 +--- a/drivers/tty/n_gsm.c
901 ++++ b/drivers/tty/n_gsm.c
902 +@@ -2276,6 +2276,7 @@ static void gsm_copy_config_values(struct gsm_mux *gsm,
903 +
904 + static int gsm_config(struct gsm_mux *gsm, struct gsm_config *c)
905 + {
906 ++ int ret = 0;
907 + int need_close = 0;
908 + int need_restart = 0;
909 +
910 +@@ -2343,10 +2344,13 @@ static int gsm_config(struct gsm_mux *gsm, struct gsm_config *c)
911 + * FIXME: We need to separate activation/deactivation from adding
912 + * and removing from the mux array
913 + */
914 +- if (need_restart)
915 +- gsm_activate_mux(gsm);
916 +- if (gsm->initiator && need_close)
917 +- gsm_dlci_begin_open(gsm->dlci[0]);
918 ++ if (gsm->dead) {
919 ++ ret = gsm_activate_mux(gsm);
920 ++ if (ret)
921 ++ return ret;
922 ++ if (gsm->initiator)
923 ++ gsm_dlci_begin_open(gsm->dlci[0]);
924 ++ }
925 + return 0;
926 + }
927 +
928 +diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c
929 +index fb65dc601b237..de48a58460f47 100644
930 +--- a/drivers/tty/serial/8250/8250_mtk.c
931 ++++ b/drivers/tty/serial/8250/8250_mtk.c
932 +@@ -37,6 +37,7 @@
933 + #define MTK_UART_IER_RTSI 0x40 /* Enable RTS Modem status interrupt */
934 + #define MTK_UART_IER_CTSI 0x80 /* Enable CTS Modem status interrupt */
935 +
936 ++#define MTK_UART_EFR 38 /* I/O: Extended Features Register */
937 + #define MTK_UART_EFR_EN 0x10 /* Enable enhancement feature */
938 + #define MTK_UART_EFR_RTS 0x40 /* Enable hardware rx flow control */
939 + #define MTK_UART_EFR_CTS 0x80 /* Enable hardware tx flow control */
940 +@@ -53,6 +54,9 @@
941 + #define MTK_UART_TX_TRIGGER 1
942 + #define MTK_UART_RX_TRIGGER MTK_UART_RX_SIZE
943 +
944 ++#define MTK_UART_XON1 40 /* I/O: Xon character 1 */
945 ++#define MTK_UART_XOFF1 42 /* I/O: Xoff character 1 */
946 ++
947 + #ifdef CONFIG_SERIAL_8250_DMA
948 + enum dma_rx_status {
949 + DMA_RX_START = 0,
950 +@@ -169,7 +173,7 @@ static void mtk8250_dma_enable(struct uart_8250_port *up)
951 + MTK_UART_DMA_EN_RX | MTK_UART_DMA_EN_TX);
952 +
953 + serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
954 +- serial_out(up, UART_EFR, UART_EFR_ECB);
955 ++ serial_out(up, MTK_UART_EFR, UART_EFR_ECB);
956 + serial_out(up, UART_LCR, lcr);
957 +
958 + if (dmaengine_slave_config(dma->rxchan, &dma->rxconf) != 0)
959 +@@ -232,7 +236,7 @@ static void mtk8250_set_flow_ctrl(struct uart_8250_port *up, int mode)
960 + int lcr = serial_in(up, UART_LCR);
961 +
962 + serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
963 +- serial_out(up, UART_EFR, UART_EFR_ECB);
964 ++ serial_out(up, MTK_UART_EFR, UART_EFR_ECB);
965 + serial_out(up, UART_LCR, lcr);
966 + lcr = serial_in(up, UART_LCR);
967 +
968 +@@ -241,7 +245,7 @@ static void mtk8250_set_flow_ctrl(struct uart_8250_port *up, int mode)
969 + serial_out(up, MTK_UART_ESCAPE_DAT, MTK_UART_ESCAPE_CHAR);
970 + serial_out(up, MTK_UART_ESCAPE_EN, 0x00);
971 + serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
972 +- serial_out(up, UART_EFR, serial_in(up, UART_EFR) &
973 ++ serial_out(up, MTK_UART_EFR, serial_in(up, MTK_UART_EFR) &
974 + (~(MTK_UART_EFR_HW_FC | MTK_UART_EFR_SW_FC_MASK)));
975 + serial_out(up, UART_LCR, lcr);
976 + mtk8250_disable_intrs(up, MTK_UART_IER_XOFFI |
977 +@@ -255,8 +259,8 @@ static void mtk8250_set_flow_ctrl(struct uart_8250_port *up, int mode)
978 + serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
979 +
980 + /*enable hw flow control*/
981 +- serial_out(up, UART_EFR, MTK_UART_EFR_HW_FC |
982 +- (serial_in(up, UART_EFR) &
983 ++ serial_out(up, MTK_UART_EFR, MTK_UART_EFR_HW_FC |
984 ++ (serial_in(up, MTK_UART_EFR) &
985 + (~(MTK_UART_EFR_HW_FC | MTK_UART_EFR_SW_FC_MASK))));
986 +
987 + serial_out(up, UART_LCR, lcr);
988 +@@ -270,12 +274,12 @@ static void mtk8250_set_flow_ctrl(struct uart_8250_port *up, int mode)
989 + serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
990 +
991 + /*enable sw flow control */
992 +- serial_out(up, UART_EFR, MTK_UART_EFR_XON1_XOFF1 |
993 +- (serial_in(up, UART_EFR) &
994 ++ serial_out(up, MTK_UART_EFR, MTK_UART_EFR_XON1_XOFF1 |
995 ++ (serial_in(up, MTK_UART_EFR) &
996 + (~(MTK_UART_EFR_HW_FC | MTK_UART_EFR_SW_FC_MASK))));
997 +
998 +- serial_out(up, UART_XON1, START_CHAR(port->state->port.tty));
999 +- serial_out(up, UART_XOFF1, STOP_CHAR(port->state->port.tty));
1000 ++ serial_out(up, MTK_UART_XON1, START_CHAR(port->state->port.tty));
1001 ++ serial_out(up, MTK_UART_XOFF1, STOP_CHAR(port->state->port.tty));
1002 + serial_out(up, UART_LCR, lcr);
1003 + mtk8250_disable_intrs(up, MTK_UART_IER_CTSI|MTK_UART_IER_RTSI);
1004 + mtk8250_enable_intrs(up, MTK_UART_IER_XOFFI);
1005 +diff --git a/drivers/tty/serial/digicolor-usart.c b/drivers/tty/serial/digicolor-usart.c
1006 +index 13ac36e2da4f0..c7f81aa1ce912 100644
1007 +--- a/drivers/tty/serial/digicolor-usart.c
1008 ++++ b/drivers/tty/serial/digicolor-usart.c
1009 +@@ -471,11 +471,10 @@ static int digicolor_uart_probe(struct platform_device *pdev)
1010 + if (IS_ERR(uart_clk))
1011 + return PTR_ERR(uart_clk);
1012 +
1013 +- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1014 +- dp->port.mapbase = res->start;
1015 +- dp->port.membase = devm_ioremap_resource(&pdev->dev, res);
1016 ++ dp->port.membase = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
1017 + if (IS_ERR(dp->port.membase))
1018 + return PTR_ERR(dp->port.membase);
1019 ++ dp->port.mapbase = res->start;
1020 +
1021 + irq = platform_get_irq(pdev, 0);
1022 + if (irq < 0)
1023 +diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
1024 +index d1e4a7379bebd..80332b6a1963e 100644
1025 +--- a/drivers/usb/class/cdc-wdm.c
1026 ++++ b/drivers/usb/class/cdc-wdm.c
1027 +@@ -755,6 +755,7 @@ static int wdm_release(struct inode *inode, struct file *file)
1028 + poison_urbs(desc);
1029 + spin_lock_irq(&desc->iuspin);
1030 + desc->resp_count = 0;
1031 ++ clear_bit(WDM_RESPONDING, &desc->flags);
1032 + spin_unlock_irq(&desc->iuspin);
1033 + desc->manage_power(desc->intf, 0);
1034 + unpoison_urbs(desc);
1035 +diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c
1036 +index f48a00e497945..fecdba85ab27f 100644
1037 +--- a/drivers/usb/gadget/function/f_uvc.c
1038 ++++ b/drivers/usb/gadget/function/f_uvc.c
1039 +@@ -883,17 +883,42 @@ static void uvc_free(struct usb_function *f)
1040 + kfree(uvc);
1041 + }
1042 +
1043 +-static void uvc_unbind(struct usb_configuration *c, struct usb_function *f)
1044 ++static void uvc_function_unbind(struct usb_configuration *c,
1045 ++ struct usb_function *f)
1046 + {
1047 + struct usb_composite_dev *cdev = c->cdev;
1048 + struct uvc_device *uvc = to_uvc(f);
1049 ++ long wait_ret = 1;
1050 +
1051 +- uvcg_info(f, "%s\n", __func__);
1052 ++ uvcg_info(f, "%s()\n", __func__);
1053 ++
1054 ++ /* If we know we're connected via v4l2, then there should be a cleanup
1055 ++ * of the device from userspace either via UVC_EVENT_DISCONNECT or
1056 ++ * though the video device removal uevent. Allow some time for the
1057 ++ * application to close out before things get deleted.
1058 ++ */
1059 ++ if (uvc->func_connected) {
1060 ++ uvcg_dbg(f, "waiting for clean disconnect\n");
1061 ++ wait_ret = wait_event_interruptible_timeout(uvc->func_connected_queue,
1062 ++ uvc->func_connected == false, msecs_to_jiffies(500));
1063 ++ uvcg_dbg(f, "done waiting with ret: %ld\n", wait_ret);
1064 ++ }
1065 +
1066 + device_remove_file(&uvc->vdev.dev, &dev_attr_function_name);
1067 + video_unregister_device(&uvc->vdev);
1068 + v4l2_device_unregister(&uvc->v4l2_dev);
1069 +
1070 ++ if (uvc->func_connected) {
1071 ++ /* Wait for the release to occur to ensure there are no longer any
1072 ++ * pending operations that may cause panics when resources are cleaned
1073 ++ * up.
1074 ++ */
1075 ++ uvcg_warn(f, "%s no clean disconnect, wait for release\n", __func__);
1076 ++ wait_ret = wait_event_interruptible_timeout(uvc->func_connected_queue,
1077 ++ uvc->func_connected == false, msecs_to_jiffies(1000));
1078 ++ uvcg_dbg(f, "done waiting for release with ret: %ld\n", wait_ret);
1079 ++ }
1080 ++
1081 + usb_ep_free_request(cdev->gadget->ep0, uvc->control_req);
1082 + kfree(uvc->control_buf);
1083 +
1084 +@@ -912,6 +937,7 @@ static struct usb_function *uvc_alloc(struct usb_function_instance *fi)
1085 +
1086 + mutex_init(&uvc->video.mutex);
1087 + uvc->state = UVC_STATE_DISCONNECTED;
1088 ++ init_waitqueue_head(&uvc->func_connected_queue);
1089 + opts = fi_to_f_uvc_opts(fi);
1090 +
1091 + mutex_lock(&opts->lock);
1092 +@@ -942,7 +968,7 @@ static struct usb_function *uvc_alloc(struct usb_function_instance *fi)
1093 + /* Register the function. */
1094 + uvc->func.name = "uvc";
1095 + uvc->func.bind = uvc_function_bind;
1096 +- uvc->func.unbind = uvc_unbind;
1097 ++ uvc->func.unbind = uvc_function_unbind;
1098 + uvc->func.get_alt = uvc_function_get_alt;
1099 + uvc->func.set_alt = uvc_function_set_alt;
1100 + uvc->func.disable = uvc_function_disable;
1101 +diff --git a/drivers/usb/gadget/function/uvc.h b/drivers/usb/gadget/function/uvc.h
1102 +index 893aaa70f81a4..6c4fc4913f4fd 100644
1103 +--- a/drivers/usb/gadget/function/uvc.h
1104 ++++ b/drivers/usb/gadget/function/uvc.h
1105 +@@ -14,6 +14,7 @@
1106 + #include <linux/spinlock.h>
1107 + #include <linux/usb/composite.h>
1108 + #include <linux/videodev2.h>
1109 ++#include <linux/wait.h>
1110 +
1111 + #include <media/v4l2-device.h>
1112 + #include <media/v4l2-dev.h>
1113 +@@ -118,6 +119,7 @@ struct uvc_device {
1114 + struct usb_function func;
1115 + struct uvc_video video;
1116 + bool func_connected;
1117 ++ wait_queue_head_t func_connected_queue;
1118 +
1119 + /* Descriptors */
1120 + struct {
1121 +diff --git a/drivers/usb/gadget/function/uvc_v4l2.c b/drivers/usb/gadget/function/uvc_v4l2.c
1122 +index 197c26f7aec63..65abd55ce2348 100644
1123 +--- a/drivers/usb/gadget/function/uvc_v4l2.c
1124 ++++ b/drivers/usb/gadget/function/uvc_v4l2.c
1125 +@@ -252,10 +252,11 @@ uvc_v4l2_subscribe_event(struct v4l2_fh *fh,
1126 +
1127 + static void uvc_v4l2_disable(struct uvc_device *uvc)
1128 + {
1129 +- uvc->func_connected = false;
1130 + uvc_function_disconnect(uvc);
1131 + uvcg_video_enable(&uvc->video, 0);
1132 + uvcg_free_buffers(&uvc->video.queue);
1133 ++ uvc->func_connected = false;
1134 ++ wake_up_interruptible(&uvc->func_connected_queue);
1135 + }
1136 +
1137 + static int
1138 +diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
1139 +index f14a090ce6b62..2eb4083c5b45c 100644
1140 +--- a/drivers/usb/serial/option.c
1141 ++++ b/drivers/usb/serial/option.c
1142 +@@ -2123,10 +2123,14 @@ static const struct usb_device_id option_ids[] = {
1143 + .driver_info = RSVD(3) },
1144 + { USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 (IOT version) */
1145 + .driver_info = RSVD(4) | RSVD(5) | RSVD(6) },
1146 ++ { USB_DEVICE(0x1782, 0x4d10) }, /* Fibocom L610 (AT mode) */
1147 ++ { USB_DEVICE_INTERFACE_CLASS(0x1782, 0x4d11, 0xff) }, /* Fibocom L610 (ECM/RNDIS mode) */
1148 + { USB_DEVICE(0x2cb7, 0x0104), /* Fibocom NL678 series */
1149 + .driver_info = RSVD(4) | RSVD(5) },
1150 + { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0105, 0xff), /* Fibocom NL678 series */
1151 + .driver_info = RSVD(6) },
1152 ++ { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0106, 0xff) }, /* Fibocom MA510 (ECM mode w/ diag intf.) */
1153 ++ { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x010a, 0xff) }, /* Fibocom MA510 (ECM mode) */
1154 + { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0xff, 0x30) }, /* Fibocom FG150 Diag */
1155 + { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0, 0) }, /* Fibocom FG150 AT */
1156 + { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a0, 0xff) }, /* Fibocom NL668-AM/NL652-EU (laptop MBIM) */
1157 +diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
1158 +index d736822e95e18..16118d9f23920 100644
1159 +--- a/drivers/usb/serial/pl2303.c
1160 ++++ b/drivers/usb/serial/pl2303.c
1161 +@@ -106,6 +106,7 @@ static const struct usb_device_id id_table[] = {
1162 + { USB_DEVICE(HP_VENDOR_ID, HP_LCM220_PRODUCT_ID) },
1163 + { USB_DEVICE(HP_VENDOR_ID, HP_LCM960_PRODUCT_ID) },
1164 + { USB_DEVICE(HP_VENDOR_ID, HP_LM920_PRODUCT_ID) },
1165 ++ { USB_DEVICE(HP_VENDOR_ID, HP_LM930_PRODUCT_ID) },
1166 + { USB_DEVICE(HP_VENDOR_ID, HP_LM940_PRODUCT_ID) },
1167 + { USB_DEVICE(HP_VENDOR_ID, HP_TD620_PRODUCT_ID) },
1168 + { USB_DEVICE(CRESSI_VENDOR_ID, CRESSI_EDY_PRODUCT_ID) },
1169 +diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h
1170 +index c5406452b774e..732f9b13ad5d5 100644
1171 +--- a/drivers/usb/serial/pl2303.h
1172 ++++ b/drivers/usb/serial/pl2303.h
1173 +@@ -135,6 +135,7 @@
1174 + #define HP_TD620_PRODUCT_ID 0x0956
1175 + #define HP_LD960_PRODUCT_ID 0x0b39
1176 + #define HP_LD381_PRODUCT_ID 0x0f7f
1177 ++#define HP_LM930_PRODUCT_ID 0x0f9b
1178 + #define HP_LCM220_PRODUCT_ID 0x3139
1179 + #define HP_LCM960_PRODUCT_ID 0x3239
1180 + #define HP_LD220_PRODUCT_ID 0x3524
1181 +diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
1182 +index c18bf8164bc2e..586ef5551e76e 100644
1183 +--- a/drivers/usb/serial/qcserial.c
1184 ++++ b/drivers/usb/serial/qcserial.c
1185 +@@ -166,6 +166,8 @@ static const struct usb_device_id id_table[] = {
1186 + {DEVICE_SWI(0x1199, 0x9090)}, /* Sierra Wireless EM7565 QDL */
1187 + {DEVICE_SWI(0x1199, 0x9091)}, /* Sierra Wireless EM7565 */
1188 + {DEVICE_SWI(0x1199, 0x90d2)}, /* Sierra Wireless EM9191 QDL */
1189 ++ {DEVICE_SWI(0x1199, 0xc080)}, /* Sierra Wireless EM7590 QDL */
1190 ++ {DEVICE_SWI(0x1199, 0xc081)}, /* Sierra Wireless EM7590 */
1191 + {DEVICE_SWI(0x413c, 0x81a2)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card */
1192 + {DEVICE_SWI(0x413c, 0x81a3)}, /* Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card */
1193 + {DEVICE_SWI(0x413c, 0x81a4)}, /* Dell Wireless 5570e HSPA+ (42Mbps) Mobile Broadband Card */
1194 +diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
1195 +index a06da1854c10c..49420e28a1f76 100644
1196 +--- a/drivers/usb/typec/tcpm/tcpci.c
1197 ++++ b/drivers/usb/typec/tcpm/tcpci.c
1198 +@@ -709,7 +709,7 @@ static int tcpci_remove(struct i2c_client *client)
1199 + /* Disable chip interrupts before unregistering port */
1200 + err = tcpci_write16(chip->tcpci, TCPC_ALERT_MASK, 0);
1201 + if (err < 0)
1202 +- return err;
1203 ++ dev_warn(&client->dev, "Failed to disable irqs (%pe)\n", ERR_PTR(err));
1204 +
1205 + tcpci_unregister_port(chip->tcpci);
1206 +
1207 +diff --git a/drivers/usb/typec/tcpm/tcpci_mt6360.c b/drivers/usb/typec/tcpm/tcpci_mt6360.c
1208 +index f1bd9e09bc87f..8a952eaf90163 100644
1209 +--- a/drivers/usb/typec/tcpm/tcpci_mt6360.c
1210 ++++ b/drivers/usb/typec/tcpm/tcpci_mt6360.c
1211 +@@ -15,6 +15,9 @@
1212 +
1213 + #include "tcpci.h"
1214 +
1215 ++#define MT6360_REG_PHYCTRL1 0x80
1216 ++#define MT6360_REG_PHYCTRL3 0x82
1217 ++#define MT6360_REG_PHYCTRL7 0x86
1218 + #define MT6360_REG_VCONNCTRL1 0x8C
1219 + #define MT6360_REG_MODECTRL2 0x8F
1220 + #define MT6360_REG_SWRESET 0xA0
1221 +@@ -22,6 +25,8 @@
1222 + #define MT6360_REG_DRPCTRL1 0xA2
1223 + #define MT6360_REG_DRPCTRL2 0xA3
1224 + #define MT6360_REG_I2CTORST 0xBF
1225 ++#define MT6360_REG_PHYCTRL11 0xCA
1226 ++#define MT6360_REG_RXCTRL1 0xCE
1227 + #define MT6360_REG_RXCTRL2 0xCF
1228 + #define MT6360_REG_CTDCTRL2 0xEC
1229 +
1230 +@@ -106,6 +111,27 @@ static int mt6360_tcpc_init(struct tcpci *tcpci, struct tcpci_data *tdata)
1231 + if (ret)
1232 + return ret;
1233 +
1234 ++ /* BMC PHY */
1235 ++ ret = mt6360_tcpc_write16(regmap, MT6360_REG_PHYCTRL1, 0x3A70);
1236 ++ if (ret)
1237 ++ return ret;
1238 ++
1239 ++ ret = regmap_write(regmap, MT6360_REG_PHYCTRL3, 0x82);
1240 ++ if (ret)
1241 ++ return ret;
1242 ++
1243 ++ ret = regmap_write(regmap, MT6360_REG_PHYCTRL7, 0x36);
1244 ++ if (ret)
1245 ++ return ret;
1246 ++
1247 ++ ret = mt6360_tcpc_write16(regmap, MT6360_REG_PHYCTRL11, 0x3C60);
1248 ++ if (ret)
1249 ++ return ret;
1250 ++
1251 ++ ret = regmap_write(regmap, MT6360_REG_RXCTRL1, 0xE8);
1252 ++ if (ret)
1253 ++ return ret;
1254 ++
1255 + /* Set shipping mode off, AUTOIDLE on */
1256 + return regmap_write(regmap, MT6360_REG_MODECTRL2, 0x7A);
1257 + }
1258 +diff --git a/fs/ceph/file.c b/fs/ceph/file.c
1259 +index 450050801f3b6..93d986856f1c9 100644
1260 +--- a/fs/ceph/file.c
1261 ++++ b/fs/ceph/file.c
1262 +@@ -592,9 +592,15 @@ static int ceph_finish_async_create(struct inode *dir, struct dentry *dentry,
1263 + iinfo.change_attr = 1;
1264 + ceph_encode_timespec64(&iinfo.btime, &now);
1265 +
1266 +- iinfo.xattr_len = ARRAY_SIZE(xattr_buf);
1267 +- iinfo.xattr_data = xattr_buf;
1268 +- memset(iinfo.xattr_data, 0, iinfo.xattr_len);
1269 ++ if (req->r_pagelist) {
1270 ++ iinfo.xattr_len = req->r_pagelist->length;
1271 ++ iinfo.xattr_data = req->r_pagelist->mapped_tail;
1272 ++ } else {
1273 ++ /* fake it */
1274 ++ iinfo.xattr_len = ARRAY_SIZE(xattr_buf);
1275 ++ iinfo.xattr_data = xattr_buf;
1276 ++ memset(iinfo.xattr_data, 0, iinfo.xattr_len);
1277 ++ }
1278 +
1279 + in.ino = cpu_to_le64(vino.ino);
1280 + in.snapid = cpu_to_le64(CEPH_NOSNAP);
1281 +@@ -706,6 +712,10 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
1282 + err = ceph_security_init_secctx(dentry, mode, &as_ctx);
1283 + if (err < 0)
1284 + goto out_ctx;
1285 ++ /* Async create can't handle more than a page of xattrs */
1286 ++ if (as_ctx.pagelist &&
1287 ++ !list_is_singular(&as_ctx.pagelist->head))
1288 ++ try_async = false;
1289 + } else if (!d_in_lookup(dentry)) {
1290 + /* If it's not being looked up, it's negative */
1291 + return -ENOENT;
1292 +diff --git a/fs/file_table.c b/fs/file_table.c
1293 +index 709ada3151da5..7a3b4a7f68086 100644
1294 +--- a/fs/file_table.c
1295 ++++ b/fs/file_table.c
1296 +@@ -376,6 +376,7 @@ void __fput_sync(struct file *file)
1297 + }
1298 +
1299 + EXPORT_SYMBOL(fput);
1300 ++EXPORT_SYMBOL(__fput_sync);
1301 +
1302 + void __init files_init(void)
1303 + {
1304 +diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
1305 +index 6c047570d6a94..b4fde3a8eeb4b 100644
1306 +--- a/fs/gfs2/bmap.c
1307 ++++ b/fs/gfs2/bmap.c
1308 +@@ -1235,13 +1235,12 @@ static int gfs2_iomap_end(struct inode *inode, loff_t pos, loff_t length,
1309 +
1310 + if (length != written && (iomap->flags & IOMAP_F_NEW)) {
1311 + /* Deallocate blocks that were just allocated. */
1312 +- loff_t blockmask = i_blocksize(inode) - 1;
1313 +- loff_t end = (pos + length) & ~blockmask;
1314 ++ loff_t hstart = round_up(pos + written, i_blocksize(inode));
1315 ++ loff_t hend = iomap->offset + iomap->length;
1316 +
1317 +- pos = (pos + written + blockmask) & ~blockmask;
1318 +- if (pos < end) {
1319 +- truncate_pagecache_range(inode, pos, end - 1);
1320 +- punch_hole(ip, pos, end - pos);
1321 ++ if (hstart < hend) {
1322 ++ truncate_pagecache_range(inode, hstart, hend - 1);
1323 ++ punch_hole(ip, hstart, hend - hstart);
1324 + }
1325 + }
1326 +
1327 +diff --git a/fs/io_uring.c b/fs/io_uring.c
1328 +index ab9290ab4cae0..4330603eae35d 100644
1329 +--- a/fs/io_uring.c
1330 ++++ b/fs/io_uring.c
1331 +@@ -1156,7 +1156,7 @@ static inline void __io_req_init_async(struct io_kiocb *req)
1332 + */
1333 + static inline void io_req_init_async(struct io_kiocb *req)
1334 + {
1335 +- struct io_uring_task *tctx = current->io_uring;
1336 ++ struct io_uring_task *tctx = req->task->io_uring;
1337 +
1338 + if (req->flags & REQ_F_WORK_INITIALIZED)
1339 + return;
1340 +diff --git a/fs/nfs/fs_context.c b/fs/nfs/fs_context.c
1341 +index 05b39e8f97b9a..d60c086c6e9c7 100644
1342 +--- a/fs/nfs/fs_context.c
1343 ++++ b/fs/nfs/fs_context.c
1344 +@@ -476,7 +476,7 @@ static int nfs_fs_context_parse_param(struct fs_context *fc,
1345 + if (result.negated)
1346 + ctx->flags &= ~NFS_MOUNT_SOFTREVAL;
1347 + else
1348 +- ctx->flags &= NFS_MOUNT_SOFTREVAL;
1349 ++ ctx->flags |= NFS_MOUNT_SOFTREVAL;
1350 + break;
1351 + case Opt_posix:
1352 + if (result.negated)
1353 +diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
1354 +index f96b7f8d82e52..e2a92697a6638 100644
1355 +--- a/include/linux/netdev_features.h
1356 ++++ b/include/linux/netdev_features.h
1357 +@@ -158,7 +158,7 @@ enum {
1358 + #define NETIF_F_GSO_FRAGLIST __NETIF_F(GSO_FRAGLIST)
1359 + #define NETIF_F_HW_MACSEC __NETIF_F(HW_MACSEC)
1360 +
1361 +-/* Finds the next feature with the highest number of the range of start till 0.
1362 ++/* Finds the next feature with the highest number of the range of start-1 till 0.
1363 + */
1364 + static inline int find_next_netdev_feature(u64 feature, unsigned long start)
1365 + {
1366 +@@ -177,7 +177,7 @@ static inline int find_next_netdev_feature(u64 feature, unsigned long start)
1367 + for ((bit) = find_next_netdev_feature((mask_addr), \
1368 + NETDEV_FEATURE_COUNT); \
1369 + (bit) >= 0; \
1370 +- (bit) = find_next_netdev_feature((mask_addr), (bit) - 1))
1371 ++ (bit) = find_next_netdev_feature((mask_addr), (bit)))
1372 +
1373 + /* Features valid for ethtool to change */
1374 + /* = all defined minus driver/device-class-related */
1375 +diff --git a/include/linux/sunrpc/xprtsock.h b/include/linux/sunrpc/xprtsock.h
1376 +index 8c2a712cb2420..689062afdd610 100644
1377 +--- a/include/linux/sunrpc/xprtsock.h
1378 ++++ b/include/linux/sunrpc/xprtsock.h
1379 +@@ -89,5 +89,6 @@ struct sock_xprt {
1380 + #define XPRT_SOCK_WAKE_WRITE (5)
1381 + #define XPRT_SOCK_WAKE_PENDING (6)
1382 + #define XPRT_SOCK_WAKE_DISCONNECT (7)
1383 ++#define XPRT_SOCK_CONNECT_SENT (8)
1384 +
1385 + #endif /* _LINUX_SUNRPC_XPRTSOCK_H */
1386 +diff --git a/include/net/tc_act/tc_pedit.h b/include/net/tc_act/tc_pedit.h
1387 +index 748cf87a4d7ea..3e02709a1df65 100644
1388 +--- a/include/net/tc_act/tc_pedit.h
1389 ++++ b/include/net/tc_act/tc_pedit.h
1390 +@@ -14,6 +14,7 @@ struct tcf_pedit {
1391 + struct tc_action common;
1392 + unsigned char tcfp_nkeys;
1393 + unsigned char tcfp_flags;
1394 ++ u32 tcfp_off_max_hint;
1395 + struct tc_pedit_key *tcfp_keys;
1396 + struct tcf_pedit_key_ex *tcfp_keys_ex;
1397 + };
1398 +diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h
1399 +index ed1bbac004d52..8220369ee6105 100644
1400 +--- a/include/trace/events/sunrpc.h
1401 ++++ b/include/trace/events/sunrpc.h
1402 +@@ -1006,7 +1006,6 @@ DEFINE_RPC_XPRT_LIFETIME_EVENT(connect);
1403 + DEFINE_RPC_XPRT_LIFETIME_EVENT(disconnect_auto);
1404 + DEFINE_RPC_XPRT_LIFETIME_EVENT(disconnect_done);
1405 + DEFINE_RPC_XPRT_LIFETIME_EVENT(disconnect_force);
1406 +-DEFINE_RPC_XPRT_LIFETIME_EVENT(disconnect_cleanup);
1407 + DEFINE_RPC_XPRT_LIFETIME_EVENT(destroy);
1408 +
1409 + DECLARE_EVENT_CLASS(rpc_xprt_event,
1410 +diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
1411 +index 0aa224c31f10a..ec39e123c2a51 100644
1412 +--- a/kernel/cgroup/cpuset.c
1413 ++++ b/kernel/cgroup/cpuset.c
1414 +@@ -3301,8 +3301,11 @@ static struct notifier_block cpuset_track_online_nodes_nb = {
1415 + */
1416 + void __init cpuset_init_smp(void)
1417 + {
1418 +- cpumask_copy(top_cpuset.cpus_allowed, cpu_active_mask);
1419 +- top_cpuset.mems_allowed = node_states[N_MEMORY];
1420 ++ /*
1421 ++ * cpus_allowd/mems_allowed set to v2 values in the initial
1422 ++ * cpuset_bind() call will be reset to v1 values in another
1423 ++ * cpuset_bind() call when v1 cpuset is mounted.
1424 ++ */
1425 + top_cpuset.old_mems_allowed = top_cpuset.mems_allowed;
1426 +
1427 + cpumask_copy(top_cpuset.effective_cpus, cpu_active_mask);
1428 +diff --git a/lib/dim/net_dim.c b/lib/dim/net_dim.c
1429 +index a4db51c212663..dae3b51ac3d9b 100644
1430 +--- a/lib/dim/net_dim.c
1431 ++++ b/lib/dim/net_dim.c
1432 +@@ -12,41 +12,41 @@
1433 + * Each profile size must be of NET_DIM_PARAMS_NUM_PROFILES
1434 + */
1435 + #define NET_DIM_PARAMS_NUM_PROFILES 5
1436 +-#define NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE 256
1437 +-#define NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE 128
1438 ++#define NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE 256
1439 ++#define NET_DIM_DEFAULT_TX_CQ_PKTS_FROM_EQE 128
1440 + #define NET_DIM_DEF_PROFILE_CQE 1
1441 + #define NET_DIM_DEF_PROFILE_EQE 1
1442 +
1443 + #define NET_DIM_RX_EQE_PROFILES { \
1444 +- {1, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
1445 +- {8, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
1446 +- {64, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
1447 +- {128, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
1448 +- {256, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
1449 ++ {.usec = 1, .pkts = NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE,}, \
1450 ++ {.usec = 8, .pkts = NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE,}, \
1451 ++ {.usec = 64, .pkts = NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE,}, \
1452 ++ {.usec = 128, .pkts = NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE,}, \
1453 ++ {.usec = 256, .pkts = NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE,} \
1454 + }
1455 +
1456 + #define NET_DIM_RX_CQE_PROFILES { \
1457 +- {2, 256}, \
1458 +- {8, 128}, \
1459 +- {16, 64}, \
1460 +- {32, 64}, \
1461 +- {64, 64} \
1462 ++ {.usec = 2, .pkts = 256,}, \
1463 ++ {.usec = 8, .pkts = 128,}, \
1464 ++ {.usec = 16, .pkts = 64,}, \
1465 ++ {.usec = 32, .pkts = 64,}, \
1466 ++ {.usec = 64, .pkts = 64,} \
1467 + }
1468 +
1469 + #define NET_DIM_TX_EQE_PROFILES { \
1470 +- {1, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE}, \
1471 +- {8, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE}, \
1472 +- {32, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE}, \
1473 +- {64, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE}, \
1474 +- {128, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE} \
1475 ++ {.usec = 1, .pkts = NET_DIM_DEFAULT_TX_CQ_PKTS_FROM_EQE,}, \
1476 ++ {.usec = 8, .pkts = NET_DIM_DEFAULT_TX_CQ_PKTS_FROM_EQE,}, \
1477 ++ {.usec = 32, .pkts = NET_DIM_DEFAULT_TX_CQ_PKTS_FROM_EQE,}, \
1478 ++ {.usec = 64, .pkts = NET_DIM_DEFAULT_TX_CQ_PKTS_FROM_EQE,}, \
1479 ++ {.usec = 128, .pkts = NET_DIM_DEFAULT_TX_CQ_PKTS_FROM_EQE,} \
1480 + }
1481 +
1482 + #define NET_DIM_TX_CQE_PROFILES { \
1483 +- {5, 128}, \
1484 +- {8, 64}, \
1485 +- {16, 32}, \
1486 +- {32, 32}, \
1487 +- {64, 32} \
1488 ++ {.usec = 5, .pkts = 128,}, \
1489 ++ {.usec = 8, .pkts = 64,}, \
1490 ++ {.usec = 16, .pkts = 32,}, \
1491 ++ {.usec = 32, .pkts = 32,}, \
1492 ++ {.usec = 64, .pkts = 32,} \
1493 + }
1494 +
1495 + static const struct dim_cq_moder
1496 +diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c
1497 +index 1f1f5b0873b29..895d834d479d1 100644
1498 +--- a/net/batman-adv/fragmentation.c
1499 ++++ b/net/batman-adv/fragmentation.c
1500 +@@ -478,6 +478,17 @@ int batadv_frag_send_packet(struct sk_buff *skb,
1501 + goto free_skb;
1502 + }
1503 +
1504 ++ /* GRO might have added fragments to the fragment list instead of
1505 ++ * frags[]. But this is not handled by skb_split and must be
1506 ++ * linearized to avoid incorrect length information after all
1507 ++ * batman-adv fragments were created and submitted to the
1508 ++ * hard-interface
1509 ++ */
1510 ++ if (skb_has_frag_list(skb) && __skb_linearize(skb)) {
1511 ++ ret = -ENOMEM;
1512 ++ goto free_skb;
1513 ++ }
1514 ++
1515 + /* Create one header to be copied to all fragments */
1516 + frag_header.packet_type = BATADV_UNICAST_FRAG;
1517 + frag_header.version = BATADV_COMPAT_VERSION;
1518 +diff --git a/net/core/secure_seq.c b/net/core/secure_seq.c
1519 +index b5bc680d47553..b8a33c841846f 100644
1520 +--- a/net/core/secure_seq.c
1521 ++++ b/net/core/secure_seq.c
1522 +@@ -22,6 +22,8 @@
1523 + static siphash_key_t net_secret __read_mostly;
1524 + static siphash_key_t ts_secret __read_mostly;
1525 +
1526 ++#define EPHEMERAL_PORT_SHUFFLE_PERIOD (10 * HZ)
1527 ++
1528 + static __always_inline void net_secret_init(void)
1529 + {
1530 + net_get_random_once(&net_secret, sizeof(net_secret));
1531 +@@ -100,11 +102,13 @@ u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr,
1532 + const struct {
1533 + struct in6_addr saddr;
1534 + struct in6_addr daddr;
1535 ++ unsigned int timeseed;
1536 + __be16 dport;
1537 + } __aligned(SIPHASH_ALIGNMENT) combined = {
1538 + .saddr = *(struct in6_addr *)saddr,
1539 + .daddr = *(struct in6_addr *)daddr,
1540 +- .dport = dport
1541 ++ .timeseed = jiffies / EPHEMERAL_PORT_SHUFFLE_PERIOD,
1542 ++ .dport = dport,
1543 + };
1544 + net_secret_init();
1545 + return siphash(&combined, offsetofend(typeof(combined), dport),
1546 +@@ -145,8 +149,10 @@ EXPORT_SYMBOL_GPL(secure_tcp_seq);
1547 + u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport)
1548 + {
1549 + net_secret_init();
1550 +- return siphash_3u32((__force u32)saddr, (__force u32)daddr,
1551 +- (__force u16)dport, &net_secret);
1552 ++ return siphash_4u32((__force u32)saddr, (__force u32)daddr,
1553 ++ (__force u16)dport,
1554 ++ jiffies / EPHEMERAL_PORT_SHUFFLE_PERIOD,
1555 ++ &net_secret);
1556 + }
1557 + EXPORT_SYMBOL_GPL(secure_ipv4_port_ephemeral);
1558 + #endif
1559 +diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
1560 +index e60ca03543a53..2853a3f0fc632 100644
1561 +--- a/net/ipv4/ping.c
1562 ++++ b/net/ipv4/ping.c
1563 +@@ -305,6 +305,7 @@ static int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk,
1564 + struct net *net = sock_net(sk);
1565 + if (sk->sk_family == AF_INET) {
1566 + struct sockaddr_in *addr = (struct sockaddr_in *) uaddr;
1567 ++ u32 tb_id = RT_TABLE_LOCAL;
1568 + int chk_addr_ret;
1569 +
1570 + if (addr_len < sizeof(*addr))
1571 +@@ -320,8 +321,10 @@ static int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk,
1572 +
1573 + if (addr->sin_addr.s_addr == htonl(INADDR_ANY))
1574 + chk_addr_ret = RTN_LOCAL;
1575 +- else
1576 +- chk_addr_ret = inet_addr_type(net, addr->sin_addr.s_addr);
1577 ++ else {
1578 ++ tb_id = l3mdev_fib_table_by_index(net, sk->sk_bound_dev_if) ? : tb_id;
1579 ++ chk_addr_ret = inet_addr_type_table(net, addr->sin_addr.s_addr, tb_id);
1580 ++ }
1581 +
1582 + if ((!inet_can_nonlocal_bind(net, isk) &&
1583 + chk_addr_ret != RTN_LOCAL) ||
1584 +@@ -359,6 +362,14 @@ static int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk,
1585 + return -ENODEV;
1586 + }
1587 + }
1588 ++
1589 ++ if (!dev && sk->sk_bound_dev_if) {
1590 ++ dev = dev_get_by_index_rcu(net, sk->sk_bound_dev_if);
1591 ++ if (!dev) {
1592 ++ rcu_read_unlock();
1593 ++ return -ENODEV;
1594 ++ }
1595 ++ }
1596 + has_addr = pingv6_ops.ipv6_chk_addr(net, &addr->sin6_addr, dev,
1597 + scoped);
1598 + rcu_read_unlock();
1599 +diff --git a/net/ipv4/route.c b/net/ipv4/route.c
1600 +index c72d0de8bf714..4080e3c6c50d8 100644
1601 +--- a/net/ipv4/route.c
1602 ++++ b/net/ipv4/route.c
1603 +@@ -1792,6 +1792,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr,
1604 + #endif
1605 + RT_CACHE_STAT_INC(in_slow_mc);
1606 +
1607 ++ skb_dst_drop(skb);
1608 + skb_dst_set(skb, &rth->dst);
1609 + return 0;
1610 + }
1611 +diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
1612 +index 0dba353d3f8fe..3988403064ab6 100644
1613 +--- a/net/mac80211/mlme.c
1614 ++++ b/net/mac80211/mlme.c
1615 +@@ -3528,6 +3528,12 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
1616 + cbss->transmitted_bss->bssid);
1617 + bss_conf->bssid_indicator = cbss->max_bssid_indicator;
1618 + bss_conf->bssid_index = cbss->bssid_index;
1619 ++ } else {
1620 ++ bss_conf->nontransmitted = false;
1621 ++ memset(bss_conf->transmitter_bssid, 0,
1622 ++ sizeof(bss_conf->transmitter_bssid));
1623 ++ bss_conf->bssid_indicator = 0;
1624 ++ bss_conf->bssid_index = 0;
1625 + }
1626 +
1627 + /*
1628 +diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
1629 +index cbfb601c4ee98..d96a610929d9a 100644
1630 +--- a/net/netlink/af_netlink.c
1631 ++++ b/net/netlink/af_netlink.c
1632 +@@ -1988,7 +1988,6 @@ static int netlink_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
1633 + copied = len;
1634 + }
1635 +
1636 +- skb_reset_transport_header(data_skb);
1637 + err = skb_copy_datagram_msg(data_skb, 0, msg, copied);
1638 +
1639 + if (msg->msg_name) {
1640 +diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
1641 +index b45304446e13d..90510298b32a6 100644
1642 +--- a/net/sched/act_pedit.c
1643 ++++ b/net/sched/act_pedit.c
1644 +@@ -149,7 +149,7 @@ static int tcf_pedit_init(struct net *net, struct nlattr *nla,
1645 + struct nlattr *pattr;
1646 + struct tcf_pedit *p;
1647 + int ret = 0, err;
1648 +- int ksize;
1649 ++ int i, ksize;
1650 + u32 index;
1651 +
1652 + if (!nla) {
1653 +@@ -228,6 +228,18 @@ static int tcf_pedit_init(struct net *net, struct nlattr *nla,
1654 + p->tcfp_nkeys = parm->nkeys;
1655 + }
1656 + memcpy(p->tcfp_keys, parm->keys, ksize);
1657 ++ p->tcfp_off_max_hint = 0;
1658 ++ for (i = 0; i < p->tcfp_nkeys; ++i) {
1659 ++ u32 cur = p->tcfp_keys[i].off;
1660 ++
1661 ++ /* The AT option can read a single byte, we can bound the actual
1662 ++ * value with uchar max.
1663 ++ */
1664 ++ cur += (0xff & p->tcfp_keys[i].offmask) >> p->tcfp_keys[i].shift;
1665 ++
1666 ++ /* Each key touches 4 bytes starting from the computed offset */
1667 ++ p->tcfp_off_max_hint = max(p->tcfp_off_max_hint, cur + 4);
1668 ++ }
1669 +
1670 + p->tcfp_flags = parm->flags;
1671 + goto_ch = tcf_action_set_ctrlact(*a, parm->action, goto_ch);
1672 +@@ -308,13 +320,18 @@ static int tcf_pedit_act(struct sk_buff *skb, const struct tc_action *a,
1673 + struct tcf_result *res)
1674 + {
1675 + struct tcf_pedit *p = to_pedit(a);
1676 ++ u32 max_offset;
1677 + int i;
1678 +
1679 +- if (skb_unclone(skb, GFP_ATOMIC))
1680 +- return p->tcf_action;
1681 +-
1682 + spin_lock(&p->tcf_lock);
1683 +
1684 ++ max_offset = (skb_transport_header_was_set(skb) ?
1685 ++ skb_transport_offset(skb) :
1686 ++ skb_network_offset(skb)) +
1687 ++ p->tcfp_off_max_hint;
1688 ++ if (skb_ensure_writable(skb, min(skb->len, max_offset)))
1689 ++ goto unlock;
1690 ++
1691 + tcf_lastuse_update(&p->tcf_tm);
1692 +
1693 + if (p->tcfp_nkeys > 0) {
1694 +@@ -403,6 +420,7 @@ bad:
1695 + p->tcf_qstats.overlimits++;
1696 + done:
1697 + bstats_update(&p->tcf_bstats, skb);
1698 ++unlock:
1699 + spin_unlock(&p->tcf_lock);
1700 + return p->tcf_action;
1701 + }
1702 +diff --git a/net/smc/smc_rx.c b/net/smc/smc_rx.c
1703 +index fcfac59f8b728..7f7e983e42b1f 100644
1704 +--- a/net/smc/smc_rx.c
1705 ++++ b/net/smc/smc_rx.c
1706 +@@ -346,12 +346,12 @@ int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg,
1707 + }
1708 + break;
1709 + }
1710 ++ if (!timeo)
1711 ++ return -EAGAIN;
1712 + if (signal_pending(current)) {
1713 + read_done = sock_intr_errno(timeo);
1714 + break;
1715 + }
1716 +- if (!timeo)
1717 +- return -EAGAIN;
1718 + }
1719 +
1720 + if (!smc_rx_data_available(conn)) {
1721 +diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
1722 +index 5f854ffbab925..bb13620e62468 100644
1723 +--- a/net/sunrpc/rpc_pipe.c
1724 ++++ b/net/sunrpc/rpc_pipe.c
1725 +@@ -478,6 +478,7 @@ rpc_get_inode(struct super_block *sb, umode_t mode)
1726 + inode->i_fop = &simple_dir_operations;
1727 + inode->i_op = &simple_dir_inode_operations;
1728 + inc_nlink(inode);
1729 ++ break;
1730 + default:
1731 + break;
1732 + }
1733 +diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
1734 +index 6bc225d64d23f..13d5323f80983 100644
1735 +--- a/net/sunrpc/xprt.c
1736 ++++ b/net/sunrpc/xprt.c
1737 +@@ -731,6 +731,21 @@ void xprt_disconnect_done(struct rpc_xprt *xprt)
1738 + }
1739 + EXPORT_SYMBOL_GPL(xprt_disconnect_done);
1740 +
1741 ++/**
1742 ++ * xprt_schedule_autoclose_locked - Try to schedule an autoclose RPC call
1743 ++ * @xprt: transport to disconnect
1744 ++ */
1745 ++static void xprt_schedule_autoclose_locked(struct rpc_xprt *xprt)
1746 ++{
1747 ++ if (test_and_set_bit(XPRT_CLOSE_WAIT, &xprt->state))
1748 ++ return;
1749 ++ if (test_and_set_bit(XPRT_LOCKED, &xprt->state) == 0)
1750 ++ queue_work(xprtiod_workqueue, &xprt->task_cleanup);
1751 ++ else if (xprt->snd_task && !test_bit(XPRT_SND_IS_COOKIE, &xprt->state))
1752 ++ rpc_wake_up_queued_task_set_status(&xprt->pending,
1753 ++ xprt->snd_task, -ENOTCONN);
1754 ++}
1755 ++
1756 + /**
1757 + * xprt_force_disconnect - force a transport to disconnect
1758 + * @xprt: transport to disconnect
1759 +@@ -742,13 +757,7 @@ void xprt_force_disconnect(struct rpc_xprt *xprt)
1760 +
1761 + /* Don't race with the test_bit() in xprt_clear_locked() */
1762 + spin_lock(&xprt->transport_lock);
1763 +- set_bit(XPRT_CLOSE_WAIT, &xprt->state);
1764 +- /* Try to schedule an autoclose RPC call */
1765 +- if (test_and_set_bit(XPRT_LOCKED, &xprt->state) == 0)
1766 +- queue_work(xprtiod_workqueue, &xprt->task_cleanup);
1767 +- else if (xprt->snd_task && !test_bit(XPRT_SND_IS_COOKIE, &xprt->state))
1768 +- rpc_wake_up_queued_task_set_status(&xprt->pending,
1769 +- xprt->snd_task, -ENOTCONN);
1770 ++ xprt_schedule_autoclose_locked(xprt);
1771 + spin_unlock(&xprt->transport_lock);
1772 + }
1773 + EXPORT_SYMBOL_GPL(xprt_force_disconnect);
1774 +@@ -788,11 +797,7 @@ void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie)
1775 + goto out;
1776 + if (test_bit(XPRT_CLOSING, &xprt->state))
1777 + goto out;
1778 +- set_bit(XPRT_CLOSE_WAIT, &xprt->state);
1779 +- /* Try to schedule an autoclose RPC call */
1780 +- if (test_and_set_bit(XPRT_LOCKED, &xprt->state) == 0)
1781 +- queue_work(xprtiod_workqueue, &xprt->task_cleanup);
1782 +- xprt_wake_pending_tasks(xprt, -EAGAIN);
1783 ++ xprt_schedule_autoclose_locked(xprt);
1784 + out:
1785 + spin_unlock(&xprt->transport_lock);
1786 + }
1787 +@@ -881,12 +886,7 @@ void xprt_connect(struct rpc_task *task)
1788 + if (!xprt_lock_write(xprt, task))
1789 + return;
1790 +
1791 +- if (test_and_clear_bit(XPRT_CLOSE_WAIT, &xprt->state)) {
1792 +- trace_xprt_disconnect_cleanup(xprt);
1793 +- xprt->ops->close(xprt);
1794 +- }
1795 +-
1796 +- if (!xprt_connected(xprt)) {
1797 ++ if (!xprt_connected(xprt) && !test_bit(XPRT_CLOSE_WAIT, &xprt->state)) {
1798 + task->tk_rqstp->rq_connect_cookie = xprt->connect_cookie;
1799 + rpc_sleep_on_timeout(&xprt->pending, task, NULL,
1800 + xprt_request_timeout(task->tk_rqstp));
1801 +diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
1802 +index 0ca25e3cc5806..ae5b5380f0f03 100644
1803 +--- a/net/sunrpc/xprtsock.c
1804 ++++ b/net/sunrpc/xprtsock.c
1805 +@@ -871,7 +871,7 @@ static int xs_local_send_request(struct rpc_rqst *req)
1806 +
1807 + /* Close the stream if the previous transmission was incomplete */
1808 + if (xs_send_request_was_aborted(transport, req)) {
1809 +- xs_close(xprt);
1810 ++ xprt_force_disconnect(xprt);
1811 + return -ENOTCONN;
1812 + }
1813 +
1814 +@@ -909,7 +909,7 @@ static int xs_local_send_request(struct rpc_rqst *req)
1815 + -status);
1816 + fallthrough;
1817 + case -EPIPE:
1818 +- xs_close(xprt);
1819 ++ xprt_force_disconnect(xprt);
1820 + status = -ENOTCONN;
1821 + }
1822 +
1823 +@@ -1191,6 +1191,16 @@ static void xs_reset_transport(struct sock_xprt *transport)
1824 +
1825 + if (sk == NULL)
1826 + return;
1827 ++ /*
1828 ++ * Make sure we're calling this in a context from which it is safe
1829 ++ * to call __fput_sync(). In practice that means rpciod and the
1830 ++ * system workqueue.
1831 ++ */
1832 ++ if (!(current->flags & PF_WQ_WORKER)) {
1833 ++ WARN_ON_ONCE(1);
1834 ++ set_bit(XPRT_CLOSE_WAIT, &xprt->state);
1835 ++ return;
1836 ++ }
1837 +
1838 + if (atomic_read(&transport->xprt.swapper))
1839 + sk_clear_memalloc(sk);
1840 +@@ -1214,7 +1224,7 @@ static void xs_reset_transport(struct sock_xprt *transport)
1841 + mutex_unlock(&transport->recv_mutex);
1842 +
1843 + trace_rpc_socket_close(xprt, sock);
1844 +- fput(filp);
1845 ++ __fput_sync(filp);
1846 +
1847 + xprt_disconnect_done(xprt);
1848 + }
1849 +@@ -1907,6 +1917,7 @@ static int xs_local_setup_socket(struct sock_xprt *transport)
1850 + xprt->stat.connect_time += (long)jiffies -
1851 + xprt->stat.connect_start;
1852 + xprt_set_connected(xprt);
1853 ++ break;
1854 + case -ENOBUFS:
1855 + break;
1856 + case -ENOENT:
1857 +@@ -2260,10 +2271,14 @@ static void xs_tcp_setup_socket(struct work_struct *work)
1858 + struct rpc_xprt *xprt = &transport->xprt;
1859 + int status = -EIO;
1860 +
1861 +- if (!sock) {
1862 +- sock = xs_create_sock(xprt, transport,
1863 +- xs_addr(xprt)->sa_family, SOCK_STREAM,
1864 +- IPPROTO_TCP, true);
1865 ++ if (xprt_connected(xprt))
1866 ++ goto out;
1867 ++ if (test_and_clear_bit(XPRT_SOCK_CONNECT_SENT,
1868 ++ &transport->sock_state) ||
1869 ++ !sock) {
1870 ++ xs_reset_transport(transport);
1871 ++ sock = xs_create_sock(xprt, transport, xs_addr(xprt)->sa_family,
1872 ++ SOCK_STREAM, IPPROTO_TCP, true);
1873 + if (IS_ERR(sock)) {
1874 + status = PTR_ERR(sock);
1875 + goto out;
1876 +@@ -2294,6 +2309,8 @@ static void xs_tcp_setup_socket(struct work_struct *work)
1877 + break;
1878 + case 0:
1879 + case -EINPROGRESS:
1880 ++ set_bit(XPRT_SOCK_CONNECT_SENT, &transport->sock_state);
1881 ++ fallthrough;
1882 + case -EALREADY:
1883 + xprt_unlock_connect(xprt, transport);
1884 + return;
1885 +@@ -2347,11 +2364,7 @@ static void xs_connect(struct rpc_xprt *xprt, struct rpc_task *task)
1886 +
1887 + if (transport->sock != NULL) {
1888 + dprintk("RPC: xs_connect delayed xprt %p for %lu "
1889 +- "seconds\n",
1890 +- xprt, xprt->reestablish_timeout / HZ);
1891 +-
1892 +- /* Start by resetting any existing state */
1893 +- xs_reset_transport(transport);
1894 ++ "seconds\n", xprt, xprt->reestablish_timeout / HZ);
1895 +
1896 + delay = xprt_reconnect_delay(xprt);
1897 + xprt_reconnect_backoff(xprt, XS_TCP_INIT_REEST_TO);
1898 +diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c
1899 +index 1f56225a10e3c..3c82286e5bcca 100644
1900 +--- a/net/tls/tls_device.c
1901 ++++ b/net/tls/tls_device.c
1902 +@@ -1345,7 +1345,10 @@ static int tls_device_down(struct net_device *netdev)
1903 +
1904 + /* Device contexts for RX and TX will be freed in on sk_destruct
1905 + * by tls_device_free_ctx. rx_conf and tx_conf stay in TLS_HW.
1906 ++ * Now release the ref taken above.
1907 + */
1908 ++ if (refcount_dec_and_test(&ctx->refcount))
1909 ++ tls_device_free_ctx(ctx);
1910 + }
1911 +
1912 + up_write(&device_offload_lock);
1913 +diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
1914 +index 945a79e4f3eb4..5b6405392f085 100644
1915 +--- a/sound/soc/codecs/max98090.c
1916 ++++ b/sound/soc/codecs/max98090.c
1917 +@@ -413,6 +413,9 @@ static int max98090_put_enab_tlv(struct snd_kcontrol *kcontrol,
1918 +
1919 + val = (val >> mc->shift) & mask;
1920 +
1921 ++ if (sel < 0 || sel > mc->max)
1922 ++ return -EINVAL;
1923 ++
1924 + *select = sel;
1925 +
1926 + /* Setting a volume is only valid if it is already On */
1927 +@@ -427,7 +430,7 @@ static int max98090_put_enab_tlv(struct snd_kcontrol *kcontrol,
1928 + mask << mc->shift,
1929 + sel << mc->shift);
1930 +
1931 +- return 0;
1932 ++ return *select != val;
1933 + }
1934 +
1935 + static const char *max98090_perf_pwr_text[] =
1936 +diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c
1937 +index 2bc9fa6a34b8f..15bfcdbdfaa4e 100644
1938 +--- a/sound/soc/soc-ops.c
1939 ++++ b/sound/soc/soc-ops.c
1940 +@@ -510,7 +510,15 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
1941 + unsigned int mask = (1 << fls(max)) - 1;
1942 + unsigned int invert = mc->invert;
1943 + unsigned int val, val_mask;
1944 +- int err, ret;
1945 ++ int err, ret, tmp;
1946 ++
1947 ++ tmp = ucontrol->value.integer.value[0];
1948 ++ if (tmp < 0)
1949 ++ return -EINVAL;
1950 ++ if (mc->platform_max && tmp > mc->platform_max)
1951 ++ return -EINVAL;
1952 ++ if (tmp > mc->max - mc->min + 1)
1953 ++ return -EINVAL;
1954 +
1955 + if (invert)
1956 + val = (max - ucontrol->value.integer.value[0]) & mask;
1957 +@@ -525,6 +533,14 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
1958 + ret = err;
1959 +
1960 + if (snd_soc_volsw_is_stereo(mc)) {
1961 ++ tmp = ucontrol->value.integer.value[1];
1962 ++ if (tmp < 0)
1963 ++ return -EINVAL;
1964 ++ if (mc->platform_max && tmp > mc->platform_max)
1965 ++ return -EINVAL;
1966 ++ if (tmp > mc->max - mc->min + 1)
1967 ++ return -EINVAL;
1968 ++
1969 + if (invert)
1970 + val = (max - ucontrol->value.integer.value[1]) & mask;
1971 + else
1972 +diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
1973 +index 01ec6876e8f58..d8479552e2224 100644
1974 +--- a/tools/testing/selftests/vm/Makefile
1975 ++++ b/tools/testing/selftests/vm/Makefile
1976 +@@ -44,9 +44,9 @@ CAN_BUILD_I386 := $(shell ./../x86/check_cc.sh "$(CC)" ../x86/trivial_32bit_prog
1977 + CAN_BUILD_X86_64 := $(shell ./../x86/check_cc.sh "$(CC)" ../x86/trivial_64bit_program.c)
1978 + CAN_BUILD_WITH_NOPIE := $(shell ./../x86/check_cc.sh "$(CC)" ../x86/trivial_program.c -no-pie)
1979 +
1980 +-TARGETS := protection_keys
1981 +-BINARIES_32 := $(TARGETS:%=%_32)
1982 +-BINARIES_64 := $(TARGETS:%=%_64)
1983 ++VMTARGETS := protection_keys
1984 ++BINARIES_32 := $(VMTARGETS:%=%_32)
1985 ++BINARIES_64 := $(VMTARGETS:%=%_64)
1986 +
1987 + ifeq ($(CAN_BUILD_WITH_NOPIE),1)
1988 + CFLAGS += -no-pie
1989 +@@ -101,7 +101,7 @@ $(BINARIES_32): CFLAGS += -m32
1990 + $(BINARIES_32): LDLIBS += -lrt -ldl -lm
1991 + $(BINARIES_32): $(OUTPUT)/%_32: %.c
1992 + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(notdir $^) $(LDLIBS) -o $@
1993 +-$(foreach t,$(TARGETS),$(eval $(call gen-target-rule-32,$(t))))
1994 ++$(foreach t,$(VMTARGETS),$(eval $(call gen-target-rule-32,$(t))))
1995 + endif
1996 +
1997 + ifeq ($(CAN_BUILD_X86_64),1)
1998 +@@ -109,7 +109,7 @@ $(BINARIES_64): CFLAGS += -m64
1999 + $(BINARIES_64): LDLIBS += -lrt -ldl
2000 + $(BINARIES_64): $(OUTPUT)/%_64: %.c
2001 + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(notdir $^) $(LDLIBS) -o $@
2002 +-$(foreach t,$(TARGETS),$(eval $(call gen-target-rule-64,$(t))))
2003 ++$(foreach t,$(VMTARGETS),$(eval $(call gen-target-rule-64,$(t))))
2004 + endif
2005 +
2006 + # x86_64 users should be encouraged to install 32-bit libraries