Contents of /trunk/kernel-alx/patches-5.4/0294-5.4.195-all-fixes.patch
Parent Directory | Revision Log
Revision 3635 -
(show annotations)
(download)
Mon Oct 24 12:34:12 2022 UTC (19 months ago) by niro
File size: 40246 byte(s)
Mon Oct 24 12:34:12 2022 UTC (19 months ago) by niro
File size: 40246 byte(s)
-sync kernel patches
1 | diff --git a/Makefile b/Makefile |
2 | index 044a85fea9216..4297d0107bd6c 100644 |
3 | --- a/Makefile |
4 | +++ b/Makefile |
5 | @@ -1,7 +1,7 @@ |
6 | # SPDX-License-Identifier: GPL-2.0 |
7 | VERSION = 5 |
8 | PATCHLEVEL = 4 |
9 | -SUBLEVEL = 194 |
10 | +SUBLEVEL = 195 |
11 | EXTRAVERSION = |
12 | NAME = Kleptomaniac Octopus |
13 | |
14 | diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h |
15 | index 7a0596fcb2e77..3cc0f6d508836 100644 |
16 | --- a/arch/arm/include/asm/io.h |
17 | +++ b/arch/arm/include/asm/io.h |
18 | @@ -457,6 +457,9 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *addr); |
19 | extern int valid_phys_addr_range(phys_addr_t addr, size_t size); |
20 | extern int valid_mmap_phys_addr_range(unsigned long pfn, size_t size); |
21 | extern int devmem_is_allowed(unsigned long pfn); |
22 | +extern bool arch_memremap_can_ram_remap(resource_size_t offset, size_t size, |
23 | + unsigned long flags); |
24 | +#define arch_memremap_can_ram_remap arch_memremap_can_ram_remap |
25 | #endif |
26 | |
27 | /* |
28 | diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c |
29 | index 513c26b46db35..841b66515b379 100644 |
30 | --- a/arch/arm/mm/ioremap.c |
31 | +++ b/arch/arm/mm/ioremap.c |
32 | @@ -500,3 +500,11 @@ void __init early_ioremap_init(void) |
33 | { |
34 | early_ioremap_setup(); |
35 | } |
36 | + |
37 | +bool arch_memremap_can_ram_remap(resource_size_t offset, size_t size, |
38 | + unsigned long flags) |
39 | +{ |
40 | + unsigned long pfn = PHYS_PFN(offset); |
41 | + |
42 | + return memblock_is_map_memory(pfn); |
43 | +} |
44 | diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h |
45 | index 323cb306bd288..8ac55ff3094ae 100644 |
46 | --- a/arch/arm64/include/asm/io.h |
47 | +++ b/arch/arm64/include/asm/io.h |
48 | @@ -204,4 +204,8 @@ extern int valid_mmap_phys_addr_range(unsigned long pfn, size_t size); |
49 | |
50 | extern int devmem_is_allowed(unsigned long pfn); |
51 | |
52 | +extern bool arch_memremap_can_ram_remap(resource_size_t offset, size_t size, |
53 | + unsigned long flags); |
54 | +#define arch_memremap_can_ram_remap arch_memremap_can_ram_remap |
55 | + |
56 | #endif /* __ASM_IO_H */ |
57 | diff --git a/arch/arm64/mm/ioremap.c b/arch/arm64/mm/ioremap.c |
58 | index 9be71bee902ca..8dac7fcfb4bdc 100644 |
59 | --- a/arch/arm64/mm/ioremap.c |
60 | +++ b/arch/arm64/mm/ioremap.c |
61 | @@ -13,6 +13,7 @@ |
62 | #include <linux/mm.h> |
63 | #include <linux/vmalloc.h> |
64 | #include <linux/io.h> |
65 | +#include <linux/memblock.h> |
66 | |
67 | #include <asm/fixmap.h> |
68 | #include <asm/tlbflush.h> |
69 | @@ -100,3 +101,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/mips/jz4740/setup.c b/arch/mips/jz4740/setup.c |
82 | index dc8ee21e0948e..45e327960a465 100644 |
83 | --- a/arch/mips/jz4740/setup.c |
84 | +++ b/arch/mips/jz4740/setup.c |
85 | @@ -61,7 +61,7 @@ void __init plat_mem_setup(void) |
86 | |
87 | jz4740_reset_init(); |
88 | |
89 | - if (__dtb_start != __dtb_end) |
90 | + if (&__dtb_start != &__dtb_end) |
91 | dtb = __dtb_start; |
92 | else |
93 | dtb = (void *)fw_passed_dtb; |
94 | diff --git a/arch/s390/Makefile b/arch/s390/Makefile |
95 | index 2faaf456956a6..71e3d7c0b8709 100644 |
96 | --- a/arch/s390/Makefile |
97 | +++ b/arch/s390/Makefile |
98 | @@ -31,6 +31,16 @@ KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-option,-ffreestanding) |
99 | KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-disable-warning, address-of-packed-member) |
100 | KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g) |
101 | KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,)) |
102 | + |
103 | +ifdef CONFIG_CC_IS_GCC |
104 | + ifeq ($(call cc-ifversion, -ge, 1200, y), y) |
105 | + ifeq ($(call cc-ifversion, -lt, 1300, y), y) |
106 | + KBUILD_CFLAGS += $(call cc-disable-warning, array-bounds) |
107 | + KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-disable-warning, array-bounds) |
108 | + endif |
109 | + endif |
110 | +endif |
111 | + |
112 | UTS_MACHINE := s390x |
113 | STACK_SIZE := $(if $(CONFIG_KASAN),65536,16384) |
114 | CHECKFLAGS += -D__s390__ -D__s390x__ |
115 | diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c |
116 | index c7a94c94dbf37..f2f3280c3a50e 100644 |
117 | --- a/drivers/gpu/drm/nouveau/nouveau_backlight.c |
118 | +++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c |
119 | @@ -51,8 +51,9 @@ static bool |
120 | nouveau_get_backlight_name(char backlight_name[BL_NAME_SIZE], |
121 | struct nouveau_backlight *bl) |
122 | { |
123 | - const int nb = ida_simple_get(&bl_ida, 0, 0, GFP_KERNEL); |
124 | - if (nb < 0 || nb >= 100) |
125 | + const int nb = ida_alloc_max(&bl_ida, 99, GFP_KERNEL); |
126 | + |
127 | + if (nb < 0) |
128 | return false; |
129 | if (nb > 0) |
130 | snprintf(backlight_name, BL_NAME_SIZE, "nv_backlight%d", nb); |
131 | @@ -280,7 +281,7 @@ nouveau_backlight_init(struct drm_connector *connector) |
132 | nv_encoder, ops, &props); |
133 | if (IS_ERR(bl->dev)) { |
134 | if (bl->id >= 0) |
135 | - ida_simple_remove(&bl_ida, bl->id); |
136 | + ida_free(&bl_ida, bl->id); |
137 | ret = PTR_ERR(bl->dev); |
138 | goto fail_alloc; |
139 | } |
140 | @@ -306,7 +307,7 @@ nouveau_backlight_fini(struct drm_connector *connector) |
141 | return; |
142 | |
143 | if (bl->id >= 0) |
144 | - ida_simple_remove(&bl_ida, bl->id); |
145 | + ida_free(&bl_ida, bl->id); |
146 | |
147 | backlight_device_unregister(bl->dev); |
148 | nv_conn->backlight = NULL; |
149 | diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c |
150 | index 0e372a190d3f1..9b6972c953584 100644 |
151 | --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c |
152 | +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c |
153 | @@ -123,7 +123,7 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev) |
154 | |
155 | mutex_init(&tdev->iommu.mutex); |
156 | |
157 | - if (iommu_present(&platform_bus_type)) { |
158 | + if (device_iommu_mapped(dev)) { |
159 | tdev->iommu.domain = iommu_domain_alloc(&platform_bus_type); |
160 | if (!tdev->iommu.domain) |
161 | goto error; |
162 | diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c |
163 | index ea29953e0b081..8e7b05484ba85 100644 |
164 | --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c |
165 | +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c |
166 | @@ -498,7 +498,7 @@ static int vmw_fb_kms_detach(struct vmw_fb_par *par, |
167 | |
168 | static int vmw_fb_kms_framebuffer(struct fb_info *info) |
169 | { |
170 | - struct drm_mode_fb_cmd2 mode_cmd; |
171 | + struct drm_mode_fb_cmd2 mode_cmd = {0}; |
172 | struct vmw_fb_par *par = info->par; |
173 | struct fb_var_screeninfo *var = &info->var; |
174 | struct drm_framebuffer *cur_fb; |
175 | diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig |
176 | index 049563d503b68..4ea742ada36de 100644 |
177 | --- a/drivers/hwmon/Kconfig |
178 | +++ b/drivers/hwmon/Kconfig |
179 | @@ -802,7 +802,7 @@ config SENSORS_LTC4261 |
180 | |
181 | config SENSORS_LTQ_CPUTEMP |
182 | bool "Lantiq cpu temperature sensor driver" |
183 | - depends on LANTIQ |
184 | + depends on SOC_XWAY |
185 | help |
186 | If you say yes here you get support for the temperature |
187 | sensor inside your CPU. |
188 | diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c |
189 | index d09deb409de7a..3336ff9e306b2 100644 |
190 | --- a/drivers/hwmon/f71882fg.c |
191 | +++ b/drivers/hwmon/f71882fg.c |
192 | @@ -1577,8 +1577,9 @@ static ssize_t show_temp(struct device *dev, struct device_attribute *devattr, |
193 | temp *= 125; |
194 | if (sign) |
195 | temp -= 128000; |
196 | - } else |
197 | - temp = data->temp[nr] * 1000; |
198 | + } else { |
199 | + temp = ((s8)data->temp[nr]) * 1000; |
200 | + } |
201 | |
202 | return sprintf(buf, "%d\n", temp); |
203 | } |
204 | diff --git a/drivers/hwmon/tmp401.c b/drivers/hwmon/tmp401.c |
205 | index fa361d9949db7..debcece02dd33 100644 |
206 | --- a/drivers/hwmon/tmp401.c |
207 | +++ b/drivers/hwmon/tmp401.c |
208 | @@ -731,10 +731,21 @@ static int tmp401_probe(struct i2c_client *client, |
209 | return 0; |
210 | } |
211 | |
212 | +static const struct of_device_id __maybe_unused tmp4xx_of_match[] = { |
213 | + { .compatible = "ti,tmp401", }, |
214 | + { .compatible = "ti,tmp411", }, |
215 | + { .compatible = "ti,tmp431", }, |
216 | + { .compatible = "ti,tmp432", }, |
217 | + { .compatible = "ti,tmp435", }, |
218 | + { }, |
219 | +}; |
220 | +MODULE_DEVICE_TABLE(of, tmp4xx_of_match); |
221 | + |
222 | static struct i2c_driver tmp401_driver = { |
223 | .class = I2C_CLASS_HWMON, |
224 | .driver = { |
225 | .name = "tmp401", |
226 | + .of_match_table = of_match_ptr(tmp4xx_of_match), |
227 | }, |
228 | .probe = tmp401_probe, |
229 | .id_table = tmp401_id, |
230 | diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c |
231 | index a6ae4b7b11afd..7f4aa22397867 100644 |
232 | --- a/drivers/net/ethernet/intel/i40e/i40e_main.c |
233 | +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c |
234 | @@ -7120,42 +7120,43 @@ static void i40e_free_macvlan_channels(struct i40e_vsi *vsi) |
235 | static int i40e_fwd_ring_up(struct i40e_vsi *vsi, struct net_device *vdev, |
236 | struct i40e_fwd_adapter *fwd) |
237 | { |
238 | + struct i40e_channel *ch = NULL, *ch_tmp, *iter; |
239 | int ret = 0, num_tc = 1, i, aq_err; |
240 | - struct i40e_channel *ch, *ch_tmp; |
241 | struct i40e_pf *pf = vsi->back; |
242 | struct i40e_hw *hw = &pf->hw; |
243 | |
244 | - if (list_empty(&vsi->macvlan_list)) |
245 | - return -EINVAL; |
246 | - |
247 | /* Go through the list and find an available channel */ |
248 | - list_for_each_entry_safe(ch, ch_tmp, &vsi->macvlan_list, list) { |
249 | - if (!i40e_is_channel_macvlan(ch)) { |
250 | - ch->fwd = fwd; |
251 | + list_for_each_entry_safe(iter, ch_tmp, &vsi->macvlan_list, list) { |
252 | + if (!i40e_is_channel_macvlan(iter)) { |
253 | + iter->fwd = fwd; |
254 | /* record configuration for macvlan interface in vdev */ |
255 | for (i = 0; i < num_tc; i++) |
256 | netdev_bind_sb_channel_queue(vsi->netdev, vdev, |
257 | i, |
258 | - ch->num_queue_pairs, |
259 | - ch->base_queue); |
260 | - for (i = 0; i < ch->num_queue_pairs; i++) { |
261 | + iter->num_queue_pairs, |
262 | + iter->base_queue); |
263 | + for (i = 0; i < iter->num_queue_pairs; i++) { |
264 | struct i40e_ring *tx_ring, *rx_ring; |
265 | u16 pf_q; |
266 | |
267 | - pf_q = ch->base_queue + i; |
268 | + pf_q = iter->base_queue + i; |
269 | |
270 | /* Get to TX ring ptr */ |
271 | tx_ring = vsi->tx_rings[pf_q]; |
272 | - tx_ring->ch = ch; |
273 | + tx_ring->ch = iter; |
274 | |
275 | /* Get the RX ring ptr */ |
276 | rx_ring = vsi->rx_rings[pf_q]; |
277 | - rx_ring->ch = ch; |
278 | + rx_ring->ch = iter; |
279 | } |
280 | + ch = iter; |
281 | break; |
282 | } |
283 | } |
284 | |
285 | + if (!ch) |
286 | + return -EINVAL; |
287 | + |
288 | /* Guarantee all rings are updated before we update the |
289 | * MAC address filter. |
290 | */ |
291 | diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c |
292 | index 0ec13f520e907..936e64dd81b5f 100644 |
293 | --- a/drivers/net/ethernet/sfc/ef10.c |
294 | +++ b/drivers/net/ethernet/sfc/ef10.c |
295 | @@ -6160,6 +6160,11 @@ static int efx_ef10_mtd_probe(struct efx_nic *efx) |
296 | n_parts++; |
297 | } |
298 | |
299 | + if (!n_parts) { |
300 | + kfree(parts); |
301 | + return 0; |
302 | + } |
303 | + |
304 | rc = efx_mtd_add(efx, &parts[0].common, n_parts, sizeof(*parts)); |
305 | fail: |
306 | if (rc) |
307 | diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c |
308 | index bec09008997de..6e5ea68b6a7e6 100644 |
309 | --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c |
310 | +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c |
311 | @@ -932,8 +932,6 @@ static int xemaclite_open(struct net_device *dev) |
312 | xemaclite_disable_interrupts(lp); |
313 | |
314 | if (lp->phy_node) { |
315 | - u32 bmcr; |
316 | - |
317 | lp->phy_dev = of_phy_connect(lp->ndev, lp->phy_node, |
318 | xemaclite_adjust_link, 0, |
319 | PHY_INTERFACE_MODE_MII); |
320 | @@ -944,19 +942,6 @@ static int xemaclite_open(struct net_device *dev) |
321 | |
322 | /* EmacLite doesn't support giga-bit speeds */ |
323 | phy_set_max_speed(lp->phy_dev, SPEED_100); |
324 | - |
325 | - /* Don't advertise 1000BASE-T Full/Half duplex speeds */ |
326 | - phy_write(lp->phy_dev, MII_CTRL1000, 0); |
327 | - |
328 | - /* Advertise only 10 and 100mbps full/half duplex speeds */ |
329 | - phy_write(lp->phy_dev, MII_ADVERTISE, ADVERTISE_ALL | |
330 | - ADVERTISE_CSMA); |
331 | - |
332 | - /* Restart auto negotiation */ |
333 | - bmcr = phy_read(lp->phy_dev, MII_BMCR); |
334 | - bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); |
335 | - phy_write(lp->phy_dev, MII_BMCR, bmcr); |
336 | - |
337 | phy_start(lp->phy_dev); |
338 | } |
339 | |
340 | diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c |
341 | index 6c52ff8c0d2eb..9e8cf64f04420 100644 |
342 | --- a/drivers/net/phy/phy.c |
343 | +++ b/drivers/net/phy/phy.c |
344 | @@ -116,10 +116,15 @@ EXPORT_SYMBOL(phy_print_status); |
345 | */ |
346 | static int phy_clear_interrupt(struct phy_device *phydev) |
347 | { |
348 | - if (phydev->drv->ack_interrupt) |
349 | - return phydev->drv->ack_interrupt(phydev); |
350 | + int ret = 0; |
351 | |
352 | - return 0; |
353 | + if (phydev->drv->ack_interrupt) { |
354 | + mutex_lock(&phydev->lock); |
355 | + ret = phydev->drv->ack_interrupt(phydev); |
356 | + mutex_unlock(&phydev->lock); |
357 | + } |
358 | + |
359 | + return ret; |
360 | } |
361 | |
362 | /** |
363 | @@ -760,6 +765,36 @@ static int phy_disable_interrupts(struct phy_device *phydev) |
364 | return phy_clear_interrupt(phydev); |
365 | } |
366 | |
367 | +/** |
368 | + * phy_did_interrupt - Checks if the PHY generated an interrupt |
369 | + * @phydev: target phy_device struct |
370 | + */ |
371 | +static int phy_did_interrupt(struct phy_device *phydev) |
372 | +{ |
373 | + int ret; |
374 | + |
375 | + mutex_lock(&phydev->lock); |
376 | + ret = phydev->drv->did_interrupt(phydev); |
377 | + mutex_unlock(&phydev->lock); |
378 | + |
379 | + return ret; |
380 | +} |
381 | + |
382 | +/** |
383 | + * phy_handle_interrupt - PHY specific interrupt handler |
384 | + * @phydev: target phy_device struct |
385 | + */ |
386 | +static int phy_handle_interrupt(struct phy_device *phydev) |
387 | +{ |
388 | + int ret; |
389 | + |
390 | + mutex_lock(&phydev->lock); |
391 | + ret = phydev->drv->handle_interrupt(phydev); |
392 | + mutex_unlock(&phydev->lock); |
393 | + |
394 | + return ret; |
395 | +} |
396 | + |
397 | /** |
398 | * phy_interrupt - PHY interrupt handler |
399 | * @irq: interrupt line |
400 | @@ -771,11 +806,11 @@ static irqreturn_t phy_interrupt(int irq, void *phy_dat) |
401 | { |
402 | struct phy_device *phydev = phy_dat; |
403 | |
404 | - if (phydev->drv->did_interrupt && !phydev->drv->did_interrupt(phydev)) |
405 | + if (phydev->drv->did_interrupt && !phy_did_interrupt(phydev)) |
406 | return IRQ_NONE; |
407 | |
408 | if (phydev->drv->handle_interrupt) { |
409 | - if (phydev->drv->handle_interrupt(phydev)) |
410 | + if (phy_handle_interrupt(phydev)) |
411 | goto phy_err; |
412 | } else { |
413 | /* reschedule state queue work to run as soon as possible */ |
414 | diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c |
415 | index 6e1721d533846..ffe27104f654b 100644 |
416 | --- a/drivers/net/wireless/mac80211_hwsim.c |
417 | +++ b/drivers/net/wireless/mac80211_hwsim.c |
418 | @@ -2062,11 +2062,13 @@ static void hw_scan_work(struct work_struct *work) |
419 | if (req->ie_len) |
420 | skb_put_data(probe, req->ie, req->ie_len); |
421 | |
422 | + rcu_read_lock(); |
423 | if (!ieee80211_tx_prepare_skb(hwsim->hw, |
424 | hwsim->hw_scan_vif, |
425 | probe, |
426 | hwsim->tmp_chan->band, |
427 | NULL)) { |
428 | + rcu_read_unlock(); |
429 | kfree_skb(probe); |
430 | continue; |
431 | } |
432 | @@ -2074,6 +2076,7 @@ static void hw_scan_work(struct work_struct *work) |
433 | local_bh_disable(); |
434 | mac80211_hwsim_tx_frame(hwsim->hw, probe, |
435 | hwsim->tmp_chan); |
436 | + rcu_read_unlock(); |
437 | local_bh_enable(); |
438 | } |
439 | } |
440 | diff --git a/drivers/s390/net/ctcm_mpc.c b/drivers/s390/net/ctcm_mpc.c |
441 | index ab316baa82843..d766002bc5bee 100644 |
442 | --- a/drivers/s390/net/ctcm_mpc.c |
443 | +++ b/drivers/s390/net/ctcm_mpc.c |
444 | @@ -626,8 +626,6 @@ static void mpc_rcvd_sweep_resp(struct mpcg_info *mpcginfo) |
445 | ctcm_clear_busy_do(dev); |
446 | } |
447 | |
448 | - kfree(mpcginfo); |
449 | - |
450 | return; |
451 | |
452 | } |
453 | @@ -1206,10 +1204,10 @@ static void ctcmpc_unpack_skb(struct channel *ch, struct sk_buff *pskb) |
454 | CTCM_FUNTAIL, dev->name); |
455 | priv->stats.rx_dropped++; |
456 | /* mpcginfo only used for non-data transfers */ |
457 | - kfree(mpcginfo); |
458 | if (do_debug_data) |
459 | ctcmpc_dump_skb(pskb, -8); |
460 | } |
461 | + kfree(mpcginfo); |
462 | } |
463 | done: |
464 | |
465 | @@ -1991,7 +1989,6 @@ static void mpc_action_rcvd_xid0(fsm_instance *fsm, int event, void *arg) |
466 | } |
467 | break; |
468 | } |
469 | - kfree(mpcginfo); |
470 | |
471 | CTCM_PR_DEBUG("ctcmpc:%s() %s xid2:%i xid7:%i xidt_p2:%i \n", |
472 | __func__, ch->id, grp->outstanding_xid2, |
473 | @@ -2052,7 +2049,6 @@ static void mpc_action_rcvd_xid7(fsm_instance *fsm, int event, void *arg) |
474 | mpc_validate_xid(mpcginfo); |
475 | break; |
476 | } |
477 | - kfree(mpcginfo); |
478 | return; |
479 | } |
480 | |
481 | diff --git a/drivers/s390/net/ctcm_sysfs.c b/drivers/s390/net/ctcm_sysfs.c |
482 | index ded1930a00b2d..e3813a7aa5e68 100644 |
483 | --- a/drivers/s390/net/ctcm_sysfs.c |
484 | +++ b/drivers/s390/net/ctcm_sysfs.c |
485 | @@ -39,11 +39,12 @@ static ssize_t ctcm_buffer_write(struct device *dev, |
486 | struct ctcm_priv *priv = dev_get_drvdata(dev); |
487 | int rc; |
488 | |
489 | - ndev = priv->channel[CTCM_READ]->netdev; |
490 | - if (!(priv && priv->channel[CTCM_READ] && ndev)) { |
491 | + if (!(priv && priv->channel[CTCM_READ] && |
492 | + priv->channel[CTCM_READ]->netdev)) { |
493 | CTCM_DBF_TEXT(SETUP, CTC_DBF_ERROR, "bfnondev"); |
494 | return -ENODEV; |
495 | } |
496 | + ndev = priv->channel[CTCM_READ]->netdev; |
497 | |
498 | rc = kstrtouint(buf, 0, &bs1); |
499 | if (rc) |
500 | diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c |
501 | index 8f08b0a2917c6..4eec7bfb5de93 100644 |
502 | --- a/drivers/s390/net/lcs.c |
503 | +++ b/drivers/s390/net/lcs.c |
504 | @@ -1735,10 +1735,11 @@ lcs_get_control(struct lcs_card *card, struct lcs_cmd *cmd) |
505 | lcs_schedule_recovery(card); |
506 | break; |
507 | case LCS_CMD_STOPLAN: |
508 | - pr_warn("Stoplan for %s initiated by LGW\n", |
509 | - card->dev->name); |
510 | - if (card->dev) |
511 | + if (card->dev) { |
512 | + pr_warn("Stoplan for %s initiated by LGW\n", |
513 | + card->dev->name); |
514 | netif_carrier_off(card->dev); |
515 | + } |
516 | break; |
517 | default: |
518 | LCS_DBF_TEXT(5, trace, "noLGWcmd"); |
519 | diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c |
520 | index a444badd8df5a..0a6f7eeb7755b 100644 |
521 | --- a/drivers/slimbus/qcom-ctrl.c |
522 | +++ b/drivers/slimbus/qcom-ctrl.c |
523 | @@ -515,9 +515,9 @@ static int qcom_slim_probe(struct platform_device *pdev) |
524 | } |
525 | |
526 | ctrl->irq = platform_get_irq(pdev, 0); |
527 | - if (!ctrl->irq) { |
528 | + if (ctrl->irq < 0) { |
529 | dev_err(&pdev->dev, "no slimbus IRQ\n"); |
530 | - return -ENODEV; |
531 | + return ctrl->irq; |
532 | } |
533 | |
534 | sctrl = &ctrl->ctrl; |
535 | diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c |
536 | index c38f06139ccfa..907a4d0784ac0 100644 |
537 | --- a/drivers/tty/n_gsm.c |
538 | +++ b/drivers/tty/n_gsm.c |
539 | @@ -2259,6 +2259,7 @@ static void gsm_copy_config_values(struct gsm_mux *gsm, |
540 | |
541 | static int gsm_config(struct gsm_mux *gsm, struct gsm_config *c) |
542 | { |
543 | + int ret = 0; |
544 | int need_close = 0; |
545 | int need_restart = 0; |
546 | |
547 | @@ -2334,10 +2335,13 @@ static int gsm_config(struct gsm_mux *gsm, struct gsm_config *c) |
548 | * FIXME: We need to separate activation/deactivation from adding |
549 | * and removing from the mux array |
550 | */ |
551 | - if (need_restart) |
552 | - gsm_activate_mux(gsm); |
553 | - if (gsm->initiator && need_close) |
554 | - gsm_dlci_begin_open(gsm->dlci[0]); |
555 | + if (gsm->dead) { |
556 | + ret = gsm_activate_mux(gsm); |
557 | + if (ret) |
558 | + return ret; |
559 | + if (gsm->initiator) |
560 | + gsm_dlci_begin_open(gsm->dlci[0]); |
561 | + } |
562 | return 0; |
563 | } |
564 | |
565 | diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c |
566 | index 98e68f25a5f34..a79ab53f8e87d 100644 |
567 | --- a/drivers/tty/serial/8250/8250_mtk.c |
568 | +++ b/drivers/tty/serial/8250/8250_mtk.c |
569 | @@ -36,6 +36,7 @@ |
570 | #define MTK_UART_IER_RTSI 0x40 /* Enable RTS Modem status interrupt */ |
571 | #define MTK_UART_IER_CTSI 0x80 /* Enable CTS Modem status interrupt */ |
572 | |
573 | +#define MTK_UART_EFR 38 /* I/O: Extended Features Register */ |
574 | #define MTK_UART_EFR_EN 0x10 /* Enable enhancement feature */ |
575 | #define MTK_UART_EFR_RTS 0x40 /* Enable hardware rx flow control */ |
576 | #define MTK_UART_EFR_CTS 0x80 /* Enable hardware tx flow control */ |
577 | @@ -52,6 +53,9 @@ |
578 | #define MTK_UART_TX_TRIGGER 1 |
579 | #define MTK_UART_RX_TRIGGER MTK_UART_RX_SIZE |
580 | |
581 | +#define MTK_UART_XON1 40 /* I/O: Xon character 1 */ |
582 | +#define MTK_UART_XOFF1 42 /* I/O: Xoff character 1 */ |
583 | + |
584 | #ifdef CONFIG_SERIAL_8250_DMA |
585 | enum dma_rx_status { |
586 | DMA_RX_START = 0, |
587 | @@ -168,7 +172,7 @@ static void mtk8250_dma_enable(struct uart_8250_port *up) |
588 | MTK_UART_DMA_EN_RX | MTK_UART_DMA_EN_TX); |
589 | |
590 | serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B); |
591 | - serial_out(up, UART_EFR, UART_EFR_ECB); |
592 | + serial_out(up, MTK_UART_EFR, UART_EFR_ECB); |
593 | serial_out(up, UART_LCR, lcr); |
594 | |
595 | if (dmaengine_slave_config(dma->rxchan, &dma->rxconf) != 0) |
596 | @@ -231,7 +235,7 @@ static void mtk8250_set_flow_ctrl(struct uart_8250_port *up, int mode) |
597 | int lcr = serial_in(up, UART_LCR); |
598 | |
599 | serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B); |
600 | - serial_out(up, UART_EFR, UART_EFR_ECB); |
601 | + serial_out(up, MTK_UART_EFR, UART_EFR_ECB); |
602 | serial_out(up, UART_LCR, lcr); |
603 | lcr = serial_in(up, UART_LCR); |
604 | |
605 | @@ -240,7 +244,7 @@ static void mtk8250_set_flow_ctrl(struct uart_8250_port *up, int mode) |
606 | serial_out(up, MTK_UART_ESCAPE_DAT, MTK_UART_ESCAPE_CHAR); |
607 | serial_out(up, MTK_UART_ESCAPE_EN, 0x00); |
608 | serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B); |
609 | - serial_out(up, UART_EFR, serial_in(up, UART_EFR) & |
610 | + serial_out(up, MTK_UART_EFR, serial_in(up, MTK_UART_EFR) & |
611 | (~(MTK_UART_EFR_HW_FC | MTK_UART_EFR_SW_FC_MASK))); |
612 | serial_out(up, UART_LCR, lcr); |
613 | mtk8250_disable_intrs(up, MTK_UART_IER_XOFFI | |
614 | @@ -254,8 +258,8 @@ static void mtk8250_set_flow_ctrl(struct uart_8250_port *up, int mode) |
615 | serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B); |
616 | |
617 | /*enable hw flow control*/ |
618 | - serial_out(up, UART_EFR, MTK_UART_EFR_HW_FC | |
619 | - (serial_in(up, UART_EFR) & |
620 | + serial_out(up, MTK_UART_EFR, MTK_UART_EFR_HW_FC | |
621 | + (serial_in(up, MTK_UART_EFR) & |
622 | (~(MTK_UART_EFR_HW_FC | MTK_UART_EFR_SW_FC_MASK)))); |
623 | |
624 | serial_out(up, UART_LCR, lcr); |
625 | @@ -269,12 +273,12 @@ static void mtk8250_set_flow_ctrl(struct uart_8250_port *up, int mode) |
626 | serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B); |
627 | |
628 | /*enable sw flow control */ |
629 | - serial_out(up, UART_EFR, MTK_UART_EFR_XON1_XOFF1 | |
630 | - (serial_in(up, UART_EFR) & |
631 | + serial_out(up, MTK_UART_EFR, MTK_UART_EFR_XON1_XOFF1 | |
632 | + (serial_in(up, MTK_UART_EFR) & |
633 | (~(MTK_UART_EFR_HW_FC | MTK_UART_EFR_SW_FC_MASK)))); |
634 | |
635 | - serial_out(up, UART_XON1, START_CHAR(port->state->port.tty)); |
636 | - serial_out(up, UART_XOFF1, STOP_CHAR(port->state->port.tty)); |
637 | + serial_out(up, MTK_UART_XON1, START_CHAR(port->state->port.tty)); |
638 | + serial_out(up, MTK_UART_XOFF1, STOP_CHAR(port->state->port.tty)); |
639 | serial_out(up, UART_LCR, lcr); |
640 | mtk8250_disable_intrs(up, MTK_UART_IER_CTSI|MTK_UART_IER_RTSI); |
641 | mtk8250_enable_intrs(up, MTK_UART_IER_XOFFI); |
642 | diff --git a/drivers/tty/serial/digicolor-usart.c b/drivers/tty/serial/digicolor-usart.c |
643 | index 13ac36e2da4f0..4446c13629b1c 100644 |
644 | --- a/drivers/tty/serial/digicolor-usart.c |
645 | +++ b/drivers/tty/serial/digicolor-usart.c |
646 | @@ -472,10 +472,10 @@ static int digicolor_uart_probe(struct platform_device *pdev) |
647 | return PTR_ERR(uart_clk); |
648 | |
649 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
650 | - dp->port.mapbase = res->start; |
651 | dp->port.membase = devm_ioremap_resource(&pdev->dev, res); |
652 | if (IS_ERR(dp->port.membase)) |
653 | return PTR_ERR(dp->port.membase); |
654 | + dp->port.mapbase = res->start; |
655 | |
656 | irq = platform_get_irq(pdev, 0); |
657 | if (irq < 0) |
658 | diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c |
659 | index de7bb8e6a1efc..98022584f7092 100644 |
660 | --- a/drivers/usb/class/cdc-wdm.c |
661 | +++ b/drivers/usb/class/cdc-wdm.c |
662 | @@ -755,6 +755,7 @@ static int wdm_release(struct inode *inode, struct file *file) |
663 | poison_urbs(desc); |
664 | spin_lock_irq(&desc->iuspin); |
665 | desc->resp_count = 0; |
666 | + clear_bit(WDM_RESPONDING, &desc->flags); |
667 | spin_unlock_irq(&desc->iuspin); |
668 | desc->manage_power(desc->intf, 0); |
669 | unpoison_urbs(desc); |
670 | diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c |
671 | index fa978412601aa..1ba4a72047dcb 100644 |
672 | --- a/drivers/usb/serial/option.c |
673 | +++ b/drivers/usb/serial/option.c |
674 | @@ -2123,10 +2123,14 @@ static const struct usb_device_id option_ids[] = { |
675 | .driver_info = RSVD(3) }, |
676 | { USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 (IOT version) */ |
677 | .driver_info = RSVD(4) | RSVD(5) | RSVD(6) }, |
678 | + { USB_DEVICE(0x1782, 0x4d10) }, /* Fibocom L610 (AT mode) */ |
679 | + { USB_DEVICE_INTERFACE_CLASS(0x1782, 0x4d11, 0xff) }, /* Fibocom L610 (ECM/RNDIS mode) */ |
680 | { USB_DEVICE(0x2cb7, 0x0104), /* Fibocom NL678 series */ |
681 | .driver_info = RSVD(4) | RSVD(5) }, |
682 | { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0105, 0xff), /* Fibocom NL678 series */ |
683 | .driver_info = RSVD(6) }, |
684 | + { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0106, 0xff) }, /* Fibocom MA510 (ECM mode w/ diag intf.) */ |
685 | + { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x010a, 0xff) }, /* Fibocom MA510 (ECM mode) */ |
686 | { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0xff, 0x30) }, /* Fibocom FG150 Diag */ |
687 | { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0, 0) }, /* Fibocom FG150 AT */ |
688 | { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a0, 0xff) }, /* Fibocom NL668-AM/NL652-EU (laptop MBIM) */ |
689 | diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c |
690 | index 2a91219dee7e6..386894fe59eef 100644 |
691 | --- a/drivers/usb/serial/pl2303.c |
692 | +++ b/drivers/usb/serial/pl2303.c |
693 | @@ -100,6 +100,7 @@ static const struct usb_device_id id_table[] = { |
694 | { USB_DEVICE(HP_VENDOR_ID, HP_LCM220_PRODUCT_ID) }, |
695 | { USB_DEVICE(HP_VENDOR_ID, HP_LCM960_PRODUCT_ID) }, |
696 | { USB_DEVICE(HP_VENDOR_ID, HP_LM920_PRODUCT_ID) }, |
697 | + { USB_DEVICE(HP_VENDOR_ID, HP_LM930_PRODUCT_ID) }, |
698 | { USB_DEVICE(HP_VENDOR_ID, HP_LM940_PRODUCT_ID) }, |
699 | { USB_DEVICE(HP_VENDOR_ID, HP_TD620_PRODUCT_ID) }, |
700 | { USB_DEVICE(CRESSI_VENDOR_ID, CRESSI_EDY_PRODUCT_ID) }, |
701 | diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h |
702 | index 15f746e977a71..873e50088a36e 100644 |
703 | --- a/drivers/usb/serial/pl2303.h |
704 | +++ b/drivers/usb/serial/pl2303.h |
705 | @@ -129,6 +129,7 @@ |
706 | #define HP_TD620_PRODUCT_ID 0x0956 |
707 | #define HP_LD960_PRODUCT_ID 0x0b39 |
708 | #define HP_LD381_PRODUCT_ID 0x0f7f |
709 | +#define HP_LM930_PRODUCT_ID 0x0f9b |
710 | #define HP_LCM220_PRODUCT_ID 0x3139 |
711 | #define HP_LCM960_PRODUCT_ID 0x3239 |
712 | #define HP_LD220_PRODUCT_ID 0x3524 |
713 | diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c |
714 | index b1b9923162a04..3f437f07356b4 100644 |
715 | --- a/drivers/usb/serial/qcserial.c |
716 | +++ b/drivers/usb/serial/qcserial.c |
717 | @@ -166,6 +166,8 @@ static const struct usb_device_id id_table[] = { |
718 | {DEVICE_SWI(0x1199, 0x9090)}, /* Sierra Wireless EM7565 QDL */ |
719 | {DEVICE_SWI(0x1199, 0x9091)}, /* Sierra Wireless EM7565 */ |
720 | {DEVICE_SWI(0x1199, 0x90d2)}, /* Sierra Wireless EM9191 QDL */ |
721 | + {DEVICE_SWI(0x1199, 0xc080)}, /* Sierra Wireless EM7590 QDL */ |
722 | + {DEVICE_SWI(0x1199, 0xc081)}, /* Sierra Wireless EM7590 */ |
723 | {DEVICE_SWI(0x413c, 0x81a2)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card */ |
724 | {DEVICE_SWI(0x413c, 0x81a3)}, /* Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card */ |
725 | {DEVICE_SWI(0x413c, 0x81a4)}, /* Dell Wireless 5570e HSPA+ (42Mbps) Mobile Broadband Card */ |
726 | diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c |
727 | index 59e304a341f8a..6caed68ce1be7 100644 |
728 | --- a/drivers/usb/typec/tcpm/tcpci.c |
729 | +++ b/drivers/usb/typec/tcpm/tcpci.c |
730 | @@ -611,7 +611,7 @@ static int tcpci_remove(struct i2c_client *client) |
731 | /* Disable chip interrupts before unregistering port */ |
732 | err = tcpci_write16(chip->tcpci, TCPC_ALERT_MASK, 0); |
733 | if (err < 0) |
734 | - return err; |
735 | + dev_warn(&client->dev, "Failed to disable irqs (%pe)\n", ERR_PTR(err)); |
736 | |
737 | tcpci_unregister_port(chip->tcpci); |
738 | |
739 | diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c |
740 | index dec5285a02e9d..77a497a4b2368 100644 |
741 | --- a/fs/gfs2/bmap.c |
742 | +++ b/fs/gfs2/bmap.c |
743 | @@ -1233,13 +1233,12 @@ static int gfs2_iomap_end(struct inode *inode, loff_t pos, loff_t length, |
744 | |
745 | if (length != written && (iomap->flags & IOMAP_F_NEW)) { |
746 | /* Deallocate blocks that were just allocated. */ |
747 | - loff_t blockmask = i_blocksize(inode) - 1; |
748 | - loff_t end = (pos + length) & ~blockmask; |
749 | + loff_t hstart = round_up(pos + written, i_blocksize(inode)); |
750 | + loff_t hend = iomap->offset + iomap->length; |
751 | |
752 | - pos = (pos + written + blockmask) & ~blockmask; |
753 | - if (pos < end) { |
754 | - truncate_pagecache_range(inode, pos, end - 1); |
755 | - punch_hole(ip, pos, end - pos); |
756 | + if (hstart < hend) { |
757 | + truncate_pagecache_range(inode, hstart, hend - 1); |
758 | + punch_hole(ip, hstart, hend - hstart); |
759 | } |
760 | } |
761 | |
762 | diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h |
763 | index 640e7279f1617..75be8886783e1 100644 |
764 | --- a/include/linux/netdev_features.h |
765 | +++ b/include/linux/netdev_features.h |
766 | @@ -151,7 +151,7 @@ enum { |
767 | #define NETIF_F_HW_TLS_TX __NETIF_F(HW_TLS_TX) |
768 | #define NETIF_F_HW_TLS_RX __NETIF_F(HW_TLS_RX) |
769 | |
770 | -/* Finds the next feature with the highest number of the range of start till 0. |
771 | +/* Finds the next feature with the highest number of the range of start-1 till 0. |
772 | */ |
773 | static inline int find_next_netdev_feature(u64 feature, unsigned long start) |
774 | { |
775 | @@ -170,7 +170,7 @@ static inline int find_next_netdev_feature(u64 feature, unsigned long start) |
776 | for ((bit) = find_next_netdev_feature((mask_addr), \ |
777 | NETDEV_FEATURE_COUNT); \ |
778 | (bit) >= 0; \ |
779 | - (bit) = find_next_netdev_feature((mask_addr), (bit) - 1)) |
780 | + (bit) = find_next_netdev_feature((mask_addr), (bit))) |
781 | |
782 | /* Features valid for ethtool to change */ |
783 | /* = all defined minus driver/device-class-related */ |
784 | diff --git a/include/net/tc_act/tc_pedit.h b/include/net/tc_act/tc_pedit.h |
785 | index 748cf87a4d7ea..3e02709a1df65 100644 |
786 | --- a/include/net/tc_act/tc_pedit.h |
787 | +++ b/include/net/tc_act/tc_pedit.h |
788 | @@ -14,6 +14,7 @@ struct tcf_pedit { |
789 | struct tc_action common; |
790 | unsigned char tcfp_nkeys; |
791 | unsigned char tcfp_flags; |
792 | + u32 tcfp_off_max_hint; |
793 | struct tc_pedit_key *tcfp_keys; |
794 | struct tcf_pedit_key_ex *tcfp_keys_ex; |
795 | }; |
796 | diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c |
797 | index 3674798ade1fc..b02eca235ba3f 100644 |
798 | --- a/kernel/cgroup/cpuset.c |
799 | +++ b/kernel/cgroup/cpuset.c |
800 | @@ -3289,8 +3289,11 @@ static struct notifier_block cpuset_track_online_nodes_nb = { |
801 | */ |
802 | void __init cpuset_init_smp(void) |
803 | { |
804 | - cpumask_copy(top_cpuset.cpus_allowed, cpu_active_mask); |
805 | - top_cpuset.mems_allowed = node_states[N_MEMORY]; |
806 | + /* |
807 | + * cpus_allowd/mems_allowed set to v2 values in the initial |
808 | + * cpuset_bind() call will be reset to v1 values in another |
809 | + * cpuset_bind() call when v1 cpuset is mounted. |
810 | + */ |
811 | top_cpuset.old_mems_allowed = top_cpuset.mems_allowed; |
812 | |
813 | cpumask_copy(top_cpuset.effective_cpus, cpu_active_mask); |
814 | diff --git a/lib/dim/net_dim.c b/lib/dim/net_dim.c |
815 | index a4db51c212663..dae3b51ac3d9b 100644 |
816 | --- a/lib/dim/net_dim.c |
817 | +++ b/lib/dim/net_dim.c |
818 | @@ -12,41 +12,41 @@ |
819 | * Each profile size must be of NET_DIM_PARAMS_NUM_PROFILES |
820 | */ |
821 | #define NET_DIM_PARAMS_NUM_PROFILES 5 |
822 | -#define NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE 256 |
823 | -#define NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE 128 |
824 | +#define NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE 256 |
825 | +#define NET_DIM_DEFAULT_TX_CQ_PKTS_FROM_EQE 128 |
826 | #define NET_DIM_DEF_PROFILE_CQE 1 |
827 | #define NET_DIM_DEF_PROFILE_EQE 1 |
828 | |
829 | #define NET_DIM_RX_EQE_PROFILES { \ |
830 | - {1, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \ |
831 | - {8, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \ |
832 | - {64, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \ |
833 | - {128, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \ |
834 | - {256, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \ |
835 | + {.usec = 1, .pkts = NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE,}, \ |
836 | + {.usec = 8, .pkts = NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE,}, \ |
837 | + {.usec = 64, .pkts = NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE,}, \ |
838 | + {.usec = 128, .pkts = NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE,}, \ |
839 | + {.usec = 256, .pkts = NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE,} \ |
840 | } |
841 | |
842 | #define NET_DIM_RX_CQE_PROFILES { \ |
843 | - {2, 256}, \ |
844 | - {8, 128}, \ |
845 | - {16, 64}, \ |
846 | - {32, 64}, \ |
847 | - {64, 64} \ |
848 | + {.usec = 2, .pkts = 256,}, \ |
849 | + {.usec = 8, .pkts = 128,}, \ |
850 | + {.usec = 16, .pkts = 64,}, \ |
851 | + {.usec = 32, .pkts = 64,}, \ |
852 | + {.usec = 64, .pkts = 64,} \ |
853 | } |
854 | |
855 | #define NET_DIM_TX_EQE_PROFILES { \ |
856 | - {1, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE}, \ |
857 | - {8, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE}, \ |
858 | - {32, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE}, \ |
859 | - {64, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE}, \ |
860 | - {128, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE} \ |
861 | + {.usec = 1, .pkts = NET_DIM_DEFAULT_TX_CQ_PKTS_FROM_EQE,}, \ |
862 | + {.usec = 8, .pkts = NET_DIM_DEFAULT_TX_CQ_PKTS_FROM_EQE,}, \ |
863 | + {.usec = 32, .pkts = NET_DIM_DEFAULT_TX_CQ_PKTS_FROM_EQE,}, \ |
864 | + {.usec = 64, .pkts = NET_DIM_DEFAULT_TX_CQ_PKTS_FROM_EQE,}, \ |
865 | + {.usec = 128, .pkts = NET_DIM_DEFAULT_TX_CQ_PKTS_FROM_EQE,} \ |
866 | } |
867 | |
868 | #define NET_DIM_TX_CQE_PROFILES { \ |
869 | - {5, 128}, \ |
870 | - {8, 64}, \ |
871 | - {16, 32}, \ |
872 | - {32, 32}, \ |
873 | - {64, 32} \ |
874 | + {.usec = 5, .pkts = 128,}, \ |
875 | + {.usec = 8, .pkts = 64,}, \ |
876 | + {.usec = 16, .pkts = 32,}, \ |
877 | + {.usec = 32, .pkts = 32,}, \ |
878 | + {.usec = 64, .pkts = 32,} \ |
879 | } |
880 | |
881 | static const struct dim_cq_moder |
882 | diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c |
883 | index 0da90e73c79bf..f33a7f7a1249a 100644 |
884 | --- a/net/batman-adv/fragmentation.c |
885 | +++ b/net/batman-adv/fragmentation.c |
886 | @@ -478,6 +478,17 @@ int batadv_frag_send_packet(struct sk_buff *skb, |
887 | goto free_skb; |
888 | } |
889 | |
890 | + /* GRO might have added fragments to the fragment list instead of |
891 | + * frags[]. But this is not handled by skb_split and must be |
892 | + * linearized to avoid incorrect length information after all |
893 | + * batman-adv fragments were created and submitted to the |
894 | + * hard-interface |
895 | + */ |
896 | + if (skb_has_frag_list(skb) && __skb_linearize(skb)) { |
897 | + ret = -ENOMEM; |
898 | + goto free_skb; |
899 | + } |
900 | + |
901 | /* Create one header to be copied to all fragments */ |
902 | frag_header.packet_type = BATADV_UNICAST_FRAG; |
903 | frag_header.version = BATADV_COMPAT_VERSION; |
904 | diff --git a/net/core/secure_seq.c b/net/core/secure_seq.c |
905 | index 7b6b1d2c3d109..2f9796a1a63ff 100644 |
906 | --- a/net/core/secure_seq.c |
907 | +++ b/net/core/secure_seq.c |
908 | @@ -23,6 +23,8 @@ |
909 | static siphash_key_t net_secret __read_mostly; |
910 | static siphash_key_t ts_secret __read_mostly; |
911 | |
912 | +#define EPHEMERAL_PORT_SHUFFLE_PERIOD (10 * HZ) |
913 | + |
914 | static __always_inline void net_secret_init(void) |
915 | { |
916 | net_get_random_once(&net_secret, sizeof(net_secret)); |
917 | @@ -101,11 +103,13 @@ u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, |
918 | const struct { |
919 | struct in6_addr saddr; |
920 | struct in6_addr daddr; |
921 | + unsigned int timeseed; |
922 | __be16 dport; |
923 | } __aligned(SIPHASH_ALIGNMENT) combined = { |
924 | .saddr = *(struct in6_addr *)saddr, |
925 | .daddr = *(struct in6_addr *)daddr, |
926 | - .dport = dport |
927 | + .timeseed = jiffies / EPHEMERAL_PORT_SHUFFLE_PERIOD, |
928 | + .dport = dport, |
929 | }; |
930 | net_secret_init(); |
931 | return siphash(&combined, offsetofend(typeof(combined), dport), |
932 | @@ -146,8 +150,10 @@ EXPORT_SYMBOL_GPL(secure_tcp_seq); |
933 | u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport) |
934 | { |
935 | net_secret_init(); |
936 | - return siphash_3u32((__force u32)saddr, (__force u32)daddr, |
937 | - (__force u16)dport, &net_secret); |
938 | + return siphash_4u32((__force u32)saddr, (__force u32)daddr, |
939 | + (__force u16)dport, |
940 | + jiffies / EPHEMERAL_PORT_SHUFFLE_PERIOD, |
941 | + &net_secret); |
942 | } |
943 | EXPORT_SYMBOL_GPL(secure_ipv4_port_ephemeral); |
944 | #endif |
945 | diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c |
946 | index 33e6392e8b820..3ff65c9ab8ee6 100644 |
947 | --- a/net/ipv4/ping.c |
948 | +++ b/net/ipv4/ping.c |
949 | @@ -304,6 +304,7 @@ static int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk, |
950 | struct net *net = sock_net(sk); |
951 | if (sk->sk_family == AF_INET) { |
952 | struct sockaddr_in *addr = (struct sockaddr_in *) uaddr; |
953 | + u32 tb_id = RT_TABLE_LOCAL; |
954 | int chk_addr_ret; |
955 | |
956 | if (addr_len < sizeof(*addr)) |
957 | @@ -317,7 +318,8 @@ static int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk, |
958 | pr_debug("ping_check_bind_addr(sk=%p,addr=%pI4,port=%d)\n", |
959 | sk, &addr->sin_addr.s_addr, ntohs(addr->sin_port)); |
960 | |
961 | - chk_addr_ret = inet_addr_type(net, addr->sin_addr.s_addr); |
962 | + tb_id = l3mdev_fib_table_by_index(net, sk->sk_bound_dev_if) ? : tb_id; |
963 | + chk_addr_ret = inet_addr_type_table(net, addr->sin_addr.s_addr, tb_id); |
964 | |
965 | if (addr->sin_addr.s_addr == htonl(INADDR_ANY)) |
966 | chk_addr_ret = RTN_LOCAL; |
967 | @@ -358,6 +360,14 @@ static int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk, |
968 | return -ENODEV; |
969 | } |
970 | } |
971 | + |
972 | + if (!dev && sk->sk_bound_dev_if) { |
973 | + dev = dev_get_by_index_rcu(net, sk->sk_bound_dev_if); |
974 | + if (!dev) { |
975 | + rcu_read_unlock(); |
976 | + return -ENODEV; |
977 | + } |
978 | + } |
979 | has_addr = pingv6_ops.ipv6_chk_addr(net, &addr->sin6_addr, dev, |
980 | scoped); |
981 | rcu_read_unlock(); |
982 | diff --git a/net/ipv4/route.c b/net/ipv4/route.c |
983 | index d1feec97fa062..9280e50871596 100644 |
984 | --- a/net/ipv4/route.c |
985 | +++ b/net/ipv4/route.c |
986 | @@ -1775,6 +1775,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr, |
987 | #endif |
988 | RT_CACHE_STAT_INC(in_slow_mc); |
989 | |
990 | + skb_dst_drop(skb); |
991 | skb_dst_set(skb, &rth->dst); |
992 | return 0; |
993 | } |
994 | diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c |
995 | index ad00f31e20023..5415e566e09d8 100644 |
996 | --- a/net/mac80211/mlme.c |
997 | +++ b/net/mac80211/mlme.c |
998 | @@ -3406,6 +3406,12 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata, |
999 | cbss->transmitted_bss->bssid); |
1000 | bss_conf->bssid_indicator = cbss->max_bssid_indicator; |
1001 | bss_conf->bssid_index = cbss->bssid_index; |
1002 | + } else { |
1003 | + bss_conf->nontransmitted = false; |
1004 | + memset(bss_conf->transmitter_bssid, 0, |
1005 | + sizeof(bss_conf->transmitter_bssid)); |
1006 | + bss_conf->bssid_indicator = 0; |
1007 | + bss_conf->bssid_index = 0; |
1008 | } |
1009 | |
1010 | /* |
1011 | diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c |
1012 | index 8aefc52542a00..86b70385dce3b 100644 |
1013 | --- a/net/netlink/af_netlink.c |
1014 | +++ b/net/netlink/af_netlink.c |
1015 | @@ -1987,7 +1987,6 @@ static int netlink_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, |
1016 | copied = len; |
1017 | } |
1018 | |
1019 | - skb_reset_transport_header(data_skb); |
1020 | err = skb_copy_datagram_msg(data_skb, 0, msg, copied); |
1021 | |
1022 | if (msg->msg_name) { |
1023 | diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c |
1024 | index ff4f2437b5925..305cb190e9979 100644 |
1025 | --- a/net/sched/act_pedit.c |
1026 | +++ b/net/sched/act_pedit.c |
1027 | @@ -148,7 +148,7 @@ static int tcf_pedit_init(struct net *net, struct nlattr *nla, |
1028 | struct nlattr *pattr; |
1029 | struct tcf_pedit *p; |
1030 | int ret = 0, err; |
1031 | - int ksize; |
1032 | + int i, ksize; |
1033 | u32 index; |
1034 | |
1035 | if (!nla) { |
1036 | @@ -227,6 +227,18 @@ static int tcf_pedit_init(struct net *net, struct nlattr *nla, |
1037 | p->tcfp_nkeys = parm->nkeys; |
1038 | } |
1039 | memcpy(p->tcfp_keys, parm->keys, ksize); |
1040 | + p->tcfp_off_max_hint = 0; |
1041 | + for (i = 0; i < p->tcfp_nkeys; ++i) { |
1042 | + u32 cur = p->tcfp_keys[i].off; |
1043 | + |
1044 | + /* The AT option can read a single byte, we can bound the actual |
1045 | + * value with uchar max. |
1046 | + */ |
1047 | + cur += (0xff & p->tcfp_keys[i].offmask) >> p->tcfp_keys[i].shift; |
1048 | + |
1049 | + /* Each key touches 4 bytes starting from the computed offset */ |
1050 | + p->tcfp_off_max_hint = max(p->tcfp_off_max_hint, cur + 4); |
1051 | + } |
1052 | |
1053 | p->tcfp_flags = parm->flags; |
1054 | goto_ch = tcf_action_set_ctrlact(*a, parm->action, goto_ch); |
1055 | @@ -307,13 +319,18 @@ static int tcf_pedit_act(struct sk_buff *skb, const struct tc_action *a, |
1056 | struct tcf_result *res) |
1057 | { |
1058 | struct tcf_pedit *p = to_pedit(a); |
1059 | + u32 max_offset; |
1060 | int i; |
1061 | |
1062 | - if (skb_unclone(skb, GFP_ATOMIC)) |
1063 | - return p->tcf_action; |
1064 | - |
1065 | spin_lock(&p->tcf_lock); |
1066 | |
1067 | + max_offset = (skb_transport_header_was_set(skb) ? |
1068 | + skb_transport_offset(skb) : |
1069 | + skb_network_offset(skb)) + |
1070 | + p->tcfp_off_max_hint; |
1071 | + if (skb_ensure_writable(skb, min(skb->len, max_offset))) |
1072 | + goto unlock; |
1073 | + |
1074 | tcf_lastuse_update(&p->tcf_tm); |
1075 | |
1076 | if (p->tcfp_nkeys > 0) { |
1077 | @@ -402,6 +419,7 @@ bad: |
1078 | p->tcf_qstats.overlimits++; |
1079 | done: |
1080 | bstats_update(&p->tcf_bstats, skb); |
1081 | +unlock: |
1082 | spin_unlock(&p->tcf_lock); |
1083 | return p->tcf_action; |
1084 | } |
1085 | diff --git a/net/smc/smc_rx.c b/net/smc/smc_rx.c |
1086 | index 97e8369002d71..9e89bd1f706b5 100644 |
1087 | --- a/net/smc/smc_rx.c |
1088 | +++ b/net/smc/smc_rx.c |
1089 | @@ -348,12 +348,12 @@ int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg, |
1090 | } |
1091 | break; |
1092 | } |
1093 | + if (!timeo) |
1094 | + return -EAGAIN; |
1095 | if (signal_pending(current)) { |
1096 | read_done = sock_intr_errno(timeo); |
1097 | break; |
1098 | } |
1099 | - if (!timeo) |
1100 | - return -EAGAIN; |
1101 | } |
1102 | |
1103 | if (!smc_rx_data_available(conn)) { |
1104 | diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c |
1105 | index 6b9d326e11b07..ce9f99dd3e87d 100644 |
1106 | --- a/sound/soc/codecs/max98090.c |
1107 | +++ b/sound/soc/codecs/max98090.c |
1108 | @@ -413,6 +413,9 @@ static int max98090_put_enab_tlv(struct snd_kcontrol *kcontrol, |
1109 | |
1110 | val = (val >> mc->shift) & mask; |
1111 | |
1112 | + if (sel < 0 || sel > mc->max) |
1113 | + return -EINVAL; |
1114 | + |
1115 | *select = sel; |
1116 | |
1117 | /* Setting a volume is only valid if it is already On */ |
1118 | @@ -427,7 +430,7 @@ static int max98090_put_enab_tlv(struct snd_kcontrol *kcontrol, |
1119 | mask << mc->shift, |
1120 | sel << mc->shift); |
1121 | |
1122 | - return 0; |
1123 | + return *select != val; |
1124 | } |
1125 | |
1126 | static const char *max98090_perf_pwr_text[] = |
1127 | diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c |
1128 | index c88bc6bb41cfe..7a37312c8e0c2 100644 |
1129 | --- a/sound/soc/soc-ops.c |
1130 | +++ b/sound/soc/soc-ops.c |
1131 | @@ -523,7 +523,15 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, |
1132 | unsigned int mask = (1 << fls(max)) - 1; |
1133 | unsigned int invert = mc->invert; |
1134 | unsigned int val, val_mask; |
1135 | - int err, ret; |
1136 | + int err, ret, tmp; |
1137 | + |
1138 | + tmp = ucontrol->value.integer.value[0]; |
1139 | + if (tmp < 0) |
1140 | + return -EINVAL; |
1141 | + if (mc->platform_max && tmp > mc->platform_max) |
1142 | + return -EINVAL; |
1143 | + if (tmp > mc->max - mc->min + 1) |
1144 | + return -EINVAL; |
1145 | |
1146 | if (invert) |
1147 | val = (max - ucontrol->value.integer.value[0]) & mask; |
1148 | @@ -538,6 +546,14 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, |
1149 | ret = err; |
1150 | |
1151 | if (snd_soc_volsw_is_stereo(mc)) { |
1152 | + tmp = ucontrol->value.integer.value[1]; |
1153 | + if (tmp < 0) |
1154 | + return -EINVAL; |
1155 | + if (mc->platform_max && tmp > mc->platform_max) |
1156 | + return -EINVAL; |
1157 | + if (tmp > mc->max - mc->min + 1) |
1158 | + return -EINVAL; |
1159 | + |
1160 | if (invert) |
1161 | val = (max - ucontrol->value.integer.value[1]) & mask; |
1162 | else |