Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'net-5.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from Paolo Abeni:
"Including fixes from wireless and netfilter.

Current release - regressions:

- smc: fix af_ops of child socket pointing to released memory

- wifi: ath9k: fix usage of driver-private space in tx_info

Previous releases - regressions:

- ipv6: fix panic when forwarding a pkt with no in6 dev

- sctp: use the correct skb for security_sctp_assoc_request

- smc: fix NULL pointer dereference in smc_pnet_find_ib()

- sched: fix initialization order when updating chain 0 head

- phy: don't defer probe forever if PHY IRQ provider is missing

- dsa: revert "net: dsa: setup master before ports"

- dsa: felix: fix tagging protocol changes with multiple CPU ports

- eth: ice:
- fix use-after-free when freeing @rx_cpu_rmap
- revert "iavf: fix deadlock occurrence during resetting VF
interface"

- eth: lan966x: stop processing the MAC entry is port is wrong

Previous releases - always broken:

- sched:
- flower: fix parsing of ethertype following VLAN header
- taprio: check if socket flags are valid

- nfc: add flush_workqueue to prevent uaf

- veth: ensure eth header is in skb's linear part

- eth: stmmac: fix altr_tse_pcs function when using a fixed-link

- eth: macb: restart tx only if queue pointer is lagging

- eth: macvlan: fix leaking skb in source mode with nodst option"

* tag 'net-5.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (52 commits)
net: bcmgenet: Revert "Use stronger register read/writes to assure ordering"
rtnetlink: Fix handling of disabled L3 stats in RTM_GETSTATS replies
net: dsa: felix: fix tagging protocol changes with multiple CPU ports
tun: annotate access to queue->trans_start
nfc: nci: add flush_workqueue to prevent uaf
net: dsa: realtek: don't parse compatible string for RTL8366S
net: dsa: realtek: fix Kconfig to assure consistent driver linkage
net: ftgmac100: access hardware register after clock ready
Revert "net: dsa: setup master before ports"
macvlan: Fix leaking skb in source mode with nodst option
netfilter: nf_tables: nft_parse_register can return a negative value
net: lan966x: Stop processing the MAC entry is port is wrong.
net: lan966x: Fix when a port's upper is changed.
net: lan966x: Fix IGMP snooping when frames have vlan tag
net: lan966x: Update lan966x_ptp_get_nominal_value
sctp: Initialize daddr on peeled off socket
net/smc: Fix af_ops of child socket pointing to released memory
net/smc: Fix NULL pointer dereference in smc_pnet_find_ib()
net/smc: use memcpy instead of snprintf to avoid out of bounds read
net: macb: Restart tx only if queue pointer is lagging
...

+292 -185
+39 -18
Documentation/devicetree/bindings/net/socionext,uniphier-ave4.yaml
··· 13 13 This describes the devicetree bindings for AVE ethernet controller 14 14 implemented on Socionext UniPhier SoCs. 15 15 16 - allOf: 17 - - $ref: ethernet-controller.yaml# 18 - 19 16 properties: 20 17 compatible: 21 18 enum: ··· 41 44 minItems: 1 42 45 maxItems: 4 43 46 44 - clock-names: 45 - oneOf: 46 - - items: # for Pro4 47 - - const: gio 48 - - const: ether 49 - - const: ether-gb 50 - - const: ether-phy 51 - - const: ether # for others 47 + clock-names: true 52 48 53 49 resets: 54 50 minItems: 1 55 51 maxItems: 2 56 52 57 - reset-names: 58 - oneOf: 59 - - items: # for Pro4 60 - - const: gio 61 - - const: ether 62 - - const: ether # for others 53 + reset-names: true 63 54 64 55 socionext,syscon-phy-mode: 65 56 $ref: /schemas/types.yaml#/definitions/phandle-array ··· 63 78 $ref: mdio.yaml# 64 79 unevaluatedProperties: false 65 80 81 + allOf: 82 + - $ref: ethernet-controller.yaml# 83 + - if: 84 + properties: 85 + compatible: 86 + contains: 87 + const: socionext,uniphier-pro4-ave4 88 + then: 89 + properties: 90 + clocks: 91 + minItems: 4 92 + maxItems: 4 93 + clock-names: 94 + items: 95 + - const: gio 96 + - const: ether 97 + - const: ether-gb 98 + - const: ether-phy 99 + resets: 100 + minItems: 2 101 + maxItems: 2 102 + reset-names: 103 + items: 104 + - const: gio 105 + - const: ether 106 + else: 107 + properties: 108 + clocks: 109 + maxItems: 1 110 + clock-names: 111 + const: ether 112 + resets: 113 + maxItems: 1 114 + reset-names: 115 + const: ether 116 + 66 117 required: 67 118 - compatible 68 119 - reg ··· 111 90 - reset-names 112 91 - mdio 113 92 114 - additionalProperties: false 93 + unevaluatedProperties: false 115 94 116 95 examples: 117 96 - |
+2 -2
Documentation/networking/bonding.rst
··· 894 894 Uses XOR of hardware MAC addresses and packet type ID 895 895 field to generate the hash. The formula is 896 896 897 - hash = source MAC XOR destination MAC XOR packet type ID 897 + hash = source MAC[5] XOR destination MAC[5] XOR packet type ID 898 898 slave number = hash modulo slave count 899 899 900 900 This algorithm will place all traffic to a particular ··· 910 910 Uses XOR of hardware MAC addresses and IP addresses to 911 911 generate the hash. The formula is 912 912 913 - hash = source MAC XOR destination MAC XOR packet type ID 913 + hash = source MAC[5] XOR destination MAC[5] XOR packet type ID 914 914 hash = hash XOR source IP XOR destination IP 915 915 hash = hash XOR (hash RSHIFT 16) 916 916 hash = hash XOR (hash RSHIFT 8)
+3 -4
MAINTAINERS
··· 201 201 F: include/net/iw_handler.h 202 202 F: include/net/wext.h 203 203 F: include/uapi/linux/nl80211.h 204 + F: include/uapi/linux/wireless.h 204 205 F: net/wireless/ 205 206 206 207 8169 10/100/1000 GIGABIT ETHERNET DRIVER ··· 12403 12402 12404 12403 MEDIATEK MT76 WIRELESS LAN DRIVER 12405 12404 M: Felix Fietkau <nbd@nbd.name> 12406 - M: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> 12405 + M: Lorenzo Bianconi <lorenzo@kernel.org> 12407 12406 M: Ryder Lee <ryder.lee@mediatek.com> 12408 12407 R: Shayne Chen <shayne.chen@mediatek.com> 12409 12408 R: Sean Wang <sean.wang@mediatek.com> ··· 21228 21227 F: drivers/hid/hid-wiimote* 21229 21228 21230 21229 WILOCITY WIL6210 WIRELESS DRIVER 21231 - M: Maya Erez <merez@codeaurora.org> 21232 21230 L: linux-wireless@vger.kernel.org 21233 - L: wil6210@qti.qualcomm.com 21234 - S: Supported 21231 + S: Orphan 21235 21232 W: https://wireless.wiki.kernel.org/en/users/Drivers/wil6210 21236 21233 F: drivers/net/wireless/ath/wil6210/ 21237 21234
+1
drivers/base/dd.c
··· 296 296 297 297 return -EPROBE_DEFER; 298 298 } 299 + EXPORT_SYMBOL_GPL(driver_deferred_probe_check_state); 299 300 300 301 static void deferred_probe_timeout_work_func(struct work_struct *work) 301 302 {
+23
drivers/net/dsa/ocelot/felix.c
··· 670 670 struct ocelot *ocelot = ds->priv; 671 671 struct felix *felix = ocelot_to_felix(ocelot); 672 672 enum dsa_tag_protocol old_proto = felix->tag_proto; 673 + bool cpu_port_active = false; 674 + struct dsa_port *dp; 673 675 int err; 674 676 675 677 if (proto != DSA_TAG_PROTO_SEVILLE && 676 678 proto != DSA_TAG_PROTO_OCELOT && 677 679 proto != DSA_TAG_PROTO_OCELOT_8021Q) 678 680 return -EPROTONOSUPPORT; 681 + 682 + /* We don't support multiple CPU ports, yet the DT blob may have 683 + * multiple CPU ports defined. The first CPU port is the active one, 684 + * the others are inactive. In this case, DSA will call 685 + * ->change_tag_protocol() multiple times, once per CPU port. 686 + * Since we implement the tagging protocol change towards "ocelot" or 687 + * "seville" as effectively initializing the NPI port, what we are 688 + * doing is effectively changing who the NPI port is to the last @cpu 689 + * argument passed, which is an unused DSA CPU port and not the one 690 + * that should actively pass traffic. 691 + * Suppress DSA's calls on CPU ports that are inactive. 692 + */ 693 + dsa_switch_for_each_user_port(dp, ds) { 694 + if (dp->cpu_dp->index == cpu) { 695 + cpu_port_active = true; 696 + break; 697 + } 698 + } 699 + 700 + if (!cpu_port_active) 701 + return 0; 679 702 680 703 felix_del_tag_protocol(ds, cpu, old_proto); 681 704
+1 -1
drivers/net/dsa/ocelot/felix_vsc9959.c
··· 2316 2316 2317 2317 err = dsa_register_switch(ds); 2318 2318 if (err) { 2319 - dev_err(&pdev->dev, "Failed to register DSA switch: %d\n", err); 2319 + dev_err_probe(&pdev->dev, err, "Failed to register DSA switch\n"); 2320 2320 goto err_register_ds; 2321 2321 } 2322 2322
+21 -9
drivers/net/dsa/realtek/Kconfig
··· 9 9 help 10 10 Select to enable support for Realtek Ethernet switch chips. 11 11 12 + Note that at least one interface driver must be enabled for the 13 + subdrivers to be loaded. Moreover, an interface driver cannot achieve 14 + anything without at least one subdriver enabled. 15 + 16 + if NET_DSA_REALTEK 17 + 12 18 config NET_DSA_REALTEK_MDIO 13 - tristate "Realtek MDIO connected switch driver" 14 - depends on NET_DSA_REALTEK 19 + tristate "Realtek MDIO interface driver" 15 20 depends on OF 21 + depends on NET_DSA_REALTEK_RTL8365MB || NET_DSA_REALTEK_RTL8366RB 22 + depends on NET_DSA_REALTEK_RTL8365MB || !NET_DSA_REALTEK_RTL8365MB 23 + depends on NET_DSA_REALTEK_RTL8366RB || !NET_DSA_REALTEK_RTL8366RB 16 24 help 17 25 Select to enable support for registering switches configured 18 26 through MDIO. 19 27 20 28 config NET_DSA_REALTEK_SMI 21 - tristate "Realtek SMI connected switch driver" 22 - depends on NET_DSA_REALTEK 29 + tristate "Realtek SMI interface driver" 23 30 depends on OF 31 + depends on NET_DSA_REALTEK_RTL8365MB || NET_DSA_REALTEK_RTL8366RB 32 + depends on NET_DSA_REALTEK_RTL8365MB || !NET_DSA_REALTEK_RTL8365MB 33 + depends on NET_DSA_REALTEK_RTL8366RB || !NET_DSA_REALTEK_RTL8366RB 24 34 help 25 35 Select to enable support for registering switches connected 26 36 through SMI. 27 37 28 38 config NET_DSA_REALTEK_RTL8365MB 29 39 tristate "Realtek RTL8365MB switch subdriver" 30 - depends on NET_DSA_REALTEK 31 - depends on NET_DSA_REALTEK_SMI || NET_DSA_REALTEK_MDIO 40 + imply NET_DSA_REALTEK_SMI 41 + imply NET_DSA_REALTEK_MDIO 32 42 select NET_DSA_TAG_RTL8_4 33 43 help 34 44 Select to enable support for Realtek RTL8365MB-VC and RTL8367S. 35 45 36 46 config NET_DSA_REALTEK_RTL8366RB 37 47 tristate "Realtek RTL8366RB switch subdriver" 38 - depends on NET_DSA_REALTEK 39 - depends on NET_DSA_REALTEK_SMI || NET_DSA_REALTEK_MDIO 48 + imply NET_DSA_REALTEK_SMI 49 + imply NET_DSA_REALTEK_MDIO 40 50 select NET_DSA_TAG_RTL4_A 41 51 help 42 - Select to enable support for Realtek RTL8366RB 52 + Select to enable support for Realtek RTL8366RB. 53 + 54 + endif
-5
drivers/net/dsa/realtek/realtek-smi.c
··· 546 546 .data = &rtl8366rb_variant, 547 547 }, 548 548 #endif 549 - { 550 - /* FIXME: add support for RTL8366S and more */ 551 - .compatible = "realtek,rtl8366s", 552 - .data = NULL, 553 - }, 554 549 #if IS_ENABLED(CONFIG_NET_DSA_REALTEK_RTL8365MB) 555 550 { 556 551 .compatible = "realtek,rtl8365mb",
+4 -4
drivers/net/ethernet/aquantia/atlantic/aq_nic.c
··· 486 486 if (err < 0) 487 487 goto err_exit; 488 488 489 - for (i = 0U, aq_vec = self->aq_vec[0]; 490 - self->aq_vecs > i; ++i, aq_vec = self->aq_vec[i]) { 489 + for (i = 0U; self->aq_vecs > i; ++i) { 490 + aq_vec = self->aq_vec[i]; 491 491 err = aq_vec_start(aq_vec); 492 492 if (err < 0) 493 493 goto err_exit; ··· 517 517 mod_timer(&self->polling_timer, jiffies + 518 518 AQ_CFG_POLLING_TIMER_INTERVAL); 519 519 } else { 520 - for (i = 0U, aq_vec = self->aq_vec[0]; 521 - self->aq_vecs > i; ++i, aq_vec = self->aq_vec[i]) { 520 + for (i = 0U; self->aq_vecs > i; ++i) { 521 + aq_vec = self->aq_vec[i]; 522 522 err = aq_pci_func_alloc_irq(self, i, self->ndev->name, 523 523 aq_vec_isr, aq_vec, 524 524 aq_vec_get_affinity_mask(aq_vec));
+12 -12
drivers/net/ethernet/aquantia/atlantic/aq_vec.c
··· 43 43 if (!self) { 44 44 err = -EINVAL; 45 45 } else { 46 - for (i = 0U, ring = self->ring[0]; 47 - self->tx_rings > i; ++i, ring = self->ring[i]) { 46 + for (i = 0U; self->tx_rings > i; ++i) { 47 + ring = self->ring[i]; 48 48 u64_stats_update_begin(&ring[AQ_VEC_RX_ID].stats.rx.syncp); 49 49 ring[AQ_VEC_RX_ID].stats.rx.polls++; 50 50 u64_stats_update_end(&ring[AQ_VEC_RX_ID].stats.rx.syncp); ··· 182 182 self->aq_hw_ops = aq_hw_ops; 183 183 self->aq_hw = aq_hw; 184 184 185 - for (i = 0U, ring = self->ring[0]; 186 - self->tx_rings > i; ++i, ring = self->ring[i]) { 185 + for (i = 0U; self->tx_rings > i; ++i) { 186 + ring = self->ring[i]; 187 187 err = aq_ring_init(&ring[AQ_VEC_TX_ID], ATL_RING_TX); 188 188 if (err < 0) 189 189 goto err_exit; ··· 224 224 unsigned int i = 0U; 225 225 int err = 0; 226 226 227 - for (i = 0U, ring = self->ring[0]; 228 - self->tx_rings > i; ++i, ring = self->ring[i]) { 227 + for (i = 0U; self->tx_rings > i; ++i) { 228 + ring = self->ring[i]; 229 229 err = self->aq_hw_ops->hw_ring_tx_start(self->aq_hw, 230 230 &ring[AQ_VEC_TX_ID]); 231 231 if (err < 0) ··· 248 248 struct aq_ring_s *ring = NULL; 249 249 unsigned int i = 0U; 250 250 251 - for (i = 0U, ring = self->ring[0]; 252 - self->tx_rings > i; ++i, ring = self->ring[i]) { 251 + for (i = 0U; self->tx_rings > i; ++i) { 252 + ring = self->ring[i]; 253 253 self->aq_hw_ops->hw_ring_tx_stop(self->aq_hw, 254 254 &ring[AQ_VEC_TX_ID]); 255 255 ··· 268 268 if (!self) 269 269 goto err_exit; 270 270 271 - for (i = 0U, ring = self->ring[0]; 272 - self->tx_rings > i; ++i, ring = self->ring[i]) { 271 + for (i = 0U; self->tx_rings > i; ++i) { 272 + ring = self->ring[i]; 273 273 aq_ring_tx_clean(&ring[AQ_VEC_TX_ID]); 274 274 aq_ring_rx_deinit(&ring[AQ_VEC_RX_ID]); 275 275 } ··· 297 297 if (!self) 298 298 goto err_exit; 299 299 300 - for (i = 0U, ring = self->ring[0]; 301 - self->tx_rings > i; ++i, ring = self->ring[i]) { 300 + for (i = 0U; self->tx_rings > i; ++i) { 301 + ring = self->ring[i]; 302 302 aq_ring_free(&ring[AQ_VEC_TX_ID]); 303 303 if (i < self->rx_rings) 304 304 aq_ring_free(&ring[AQ_VEC_RX_ID]);
+2 -2
drivers/net/ethernet/broadcom/genet/bcmgenet.c
··· 76 76 if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(CONFIG_CPU_BIG_ENDIAN)) 77 77 __raw_writel(value, offset); 78 78 else 79 - writel(value, offset); 79 + writel_relaxed(value, offset); 80 80 } 81 81 82 82 static inline u32 bcmgenet_readl(void __iomem *offset) ··· 84 84 if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(CONFIG_CPU_BIG_ENDIAN)) 85 85 return __raw_readl(offset); 86 86 else 87 - return readl(offset); 87 + return readl_relaxed(offset); 88 88 } 89 89 90 90 static inline void dmadesc_set_length_status(struct bcmgenet_priv *priv,
+8
drivers/net/ethernet/cadence/macb_main.c
··· 1658 1658 unsigned int head = queue->tx_head; 1659 1659 unsigned int tail = queue->tx_tail; 1660 1660 struct macb *bp = queue->bp; 1661 + unsigned int head_idx, tbqp; 1661 1662 1662 1663 if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE) 1663 1664 queue_writel(queue, ISR, MACB_BIT(TXUBR)); 1664 1665 1665 1666 if (head == tail) 1667 + return; 1668 + 1669 + tbqp = queue_readl(queue, TBQP) / macb_dma_desc_get_size(bp); 1670 + tbqp = macb_adj_dma_desc_idx(bp, macb_tx_ring_wrap(bp, tbqp)); 1671 + head_idx = macb_adj_dma_desc_idx(bp, macb_tx_ring_wrap(bp, head)); 1672 + 1673 + if (tbqp == head_idx) 1666 1674 return; 1667 1675 1668 1676 macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(TSTART));
+5 -5
drivers/net/ethernet/faraday/ftgmac100.c
··· 1835 1835 priv->rxdes0_edorr_mask = BIT(30); 1836 1836 priv->txdes0_edotr_mask = BIT(30); 1837 1837 priv->is_aspeed = true; 1838 - /* Disable ast2600 problematic HW arbitration */ 1839 - if (of_device_is_compatible(np, "aspeed,ast2600-mac")) { 1840 - iowrite32(FTGMAC100_TM_DEFAULT, 1841 - priv->base + FTGMAC100_OFFSET_TM); 1842 - } 1843 1838 } else { 1844 1839 priv->rxdes0_edorr_mask = BIT(15); 1845 1840 priv->txdes0_edotr_mask = BIT(15); ··· 1906 1911 err = ftgmac100_setup_clk(priv); 1907 1912 if (err) 1908 1913 goto err_phy_connect; 1914 + 1915 + /* Disable ast2600 problematic HW arbitration */ 1916 + if (of_device_is_compatible(np, "aspeed,ast2600-mac")) 1917 + iowrite32(FTGMAC100_TM_DEFAULT, 1918 + priv->base + FTGMAC100_OFFSET_TM); 1909 1919 } 1910 1920 1911 1921 /* Default ring sizes */
+6 -2
drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c
··· 489 489 info->phc_index = -1; 490 490 491 491 fman_node = of_get_parent(mac_node); 492 - if (fman_node) 492 + if (fman_node) { 493 493 ptp_node = of_parse_phandle(fman_node, "ptimer-handle", 0); 494 + of_node_put(fman_node); 495 + } 494 496 495 - if (ptp_node) 497 + if (ptp_node) { 496 498 ptp_dev = of_find_device_by_node(ptp_node); 499 + of_node_put(ptp_node); 500 + } 497 501 498 502 if (ptp_dev) 499 503 ptp = platform_get_drvdata(ptp_dev);
+2 -5
drivers/net/ethernet/intel/iavf/iavf_main.c
··· 2871 2871 running = adapter->state == __IAVF_RUNNING; 2872 2872 2873 2873 if (running) { 2874 - netdev->flags &= ~IFF_UP; 2875 2874 netif_carrier_off(netdev); 2876 2875 netif_tx_stop_all_queues(netdev); 2877 2876 adapter->link_up = false; ··· 2987 2988 * to __IAVF_RUNNING 2988 2989 */ 2989 2990 iavf_up_complete(adapter); 2990 - netdev->flags |= IFF_UP; 2991 + 2991 2992 iavf_irq_enable(adapter, true); 2992 2993 } else { 2993 2994 iavf_change_state(adapter, __IAVF_DOWN); ··· 3003 3004 reset_err: 3004 3005 mutex_unlock(&adapter->client_lock); 3005 3006 mutex_unlock(&adapter->crit_lock); 3006 - if (running) { 3007 + if (running) 3007 3008 iavf_change_state(adapter, __IAVF_RUNNING); 3008 - netdev->flags |= IFF_UP; 3009 - } 3010 3009 dev_err(&adapter->pdev->dev, "failed to allocate resources during reinit\n"); 3011 3010 iavf_close(netdev); 3012 3011 }
+2 -7
drivers/net/ethernet/intel/ice/ice_arfs.c
··· 577 577 { 578 578 struct net_device *netdev; 579 579 580 - if (!vsi || vsi->type != ICE_VSI_PF || !vsi->arfs_fltr_list) 580 + if (!vsi || vsi->type != ICE_VSI_PF) 581 581 return; 582 582 583 583 netdev = vsi->netdev; ··· 599 599 int base_idx, i; 600 600 601 601 if (!vsi || vsi->type != ICE_VSI_PF) 602 - return -EINVAL; 602 + return 0; 603 603 604 604 pf = vsi->back; 605 605 netdev = vsi->netdev; ··· 636 636 if (!pf_vsi) 637 637 return; 638 638 639 - ice_free_cpu_rx_rmap(pf_vsi); 640 639 ice_clear_arfs(pf_vsi); 641 640 } 642 641 ··· 652 653 return; 653 654 654 655 ice_remove_arfs(pf); 655 - if (ice_set_cpu_rx_rmap(pf_vsi)) { 656 - dev_err(ice_pf_to_dev(pf), "Failed to rebuild aRFS\n"); 657 - return; 658 - } 659 656 ice_init_arfs(pf_vsi); 660 657 }
+4 -1
drivers/net/ethernet/intel/ice/ice_lib.c
··· 2689 2689 return; 2690 2690 2691 2691 vsi->irqs_ready = false; 2692 + ice_free_cpu_rx_rmap(vsi); 2693 + 2692 2694 ice_for_each_q_vector(vsi, i) { 2693 2695 u16 vector = i + base; 2694 2696 int irq_num; ··· 2704 2702 continue; 2705 2703 2706 2704 /* clear the affinity notifier in the IRQ descriptor */ 2707 - irq_set_affinity_notifier(irq_num, NULL); 2705 + if (!IS_ENABLED(CONFIG_RFS_ACCEL)) 2706 + irq_set_affinity_notifier(irq_num, NULL); 2708 2707 2709 2708 /* clear the affinity_mask in the IRQ descriptor */ 2710 2709 irq_set_affinity_hint(irq_num, NULL);
+8 -10
drivers/net/ethernet/intel/ice/ice_main.c
··· 2510 2510 irq_set_affinity_hint(irq_num, &q_vector->affinity_mask); 2511 2511 } 2512 2512 2513 + err = ice_set_cpu_rx_rmap(vsi); 2514 + if (err) { 2515 + netdev_err(vsi->netdev, "Failed to setup CPU RMAP on VSI %u: %pe\n", 2516 + vsi->vsi_num, ERR_PTR(err)); 2517 + goto free_q_irqs; 2518 + } 2519 + 2513 2520 vsi->irqs_ready = true; 2514 2521 return 0; 2515 2522 ··· 3699 3692 */ 3700 3693 ice_napi_add(vsi); 3701 3694 3702 - status = ice_set_cpu_rx_rmap(vsi); 3703 - if (status) { 3704 - dev_err(dev, "Failed to set CPU Rx map VSI %d error %d\n", 3705 - vsi->vsi_num, status); 3706 - goto unroll_napi_add; 3707 - } 3708 3695 status = ice_init_mac_fltr(pf); 3709 3696 if (status) 3710 - goto free_cpu_rx_map; 3697 + goto unroll_napi_add; 3711 3698 3712 3699 return 0; 3713 3700 3714 - free_cpu_rx_map: 3715 - ice_free_cpu_rx_rmap(vsi); 3716 3701 unroll_napi_add: 3717 3702 ice_tc_indir_block_unregister(vsi); 3718 3703 unroll_cfg_netdev: ··· 5166 5167 continue; 5167 5168 ice_vsi_free_q_vectors(pf->vsi[v]); 5168 5169 } 5169 - ice_free_cpu_rx_rmap(ice_get_main_vsi(pf)); 5170 5170 ice_clear_interrupt_scheme(pf); 5171 5171 5172 5172 pci_save_state(pdev);
+1
drivers/net/ethernet/mellanox/mlxsw/i2c.c
··· 650 650 return 0; 651 651 652 652 errout: 653 + mutex_destroy(&mlxsw_i2c->cmd.lock); 653 654 i2c_set_clientdata(client, NULL); 654 655 655 656 return err;
+4 -2
drivers/net/ethernet/microchip/lan966x/lan966x_mac.c
··· 346 346 347 347 lan966x_mac_process_raw_entry(&raw_entries[column], 348 348 mac, &vid, &dest_idx); 349 - WARN_ON(dest_idx > lan966x->num_phys_ports); 349 + if (WARN_ON(dest_idx > lan966x->num_phys_ports)) 350 + continue; 350 351 351 352 /* If the entry in SW is found, then there is nothing 352 353 * to do ··· 393 392 394 393 lan966x_mac_process_raw_entry(&raw_entries[column], 395 394 mac, &vid, &dest_idx); 396 - WARN_ON(dest_idx > lan966x->num_phys_ports); 395 + if (WARN_ON(dest_idx > lan966x->num_phys_ports)) 396 + continue; 397 397 398 398 mac_entry = lan966x_mac_alloc_entry(mac, vid, dest_idx); 399 399 if (!mac_entry)
+6
drivers/net/ethernet/microchip/lan966x/lan966x_main.c
··· 446 446 ANA_CPU_FWD_CFG_MLD_REDIR_ENA))) 447 447 return true; 448 448 449 + if (eth_type_vlan(skb->protocol)) { 450 + skb = skb_vlan_untag(skb); 451 + if (unlikely(!skb)) 452 + return false; 453 + } 454 + 449 455 if (skb->protocol == htons(ETH_P_IP) && 450 456 ip_hdr(skb)->protocol == IPPROTO_IGMP) 451 457 return false;
+4 -4
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
··· 29 29 30 30 static u64 lan966x_ptp_get_nominal_value(void) 31 31 { 32 - u64 res = 0x304d2df1; 33 - 34 - res <<= 32; 35 - return res; 32 + /* This is the default value that for each system clock, the time of day 33 + * is increased. It has the format 5.59 nanosecond. 34 + */ 35 + return 0x304d4873ecade305; 36 36 } 37 37 38 38 int lan966x_ptp_hwtstamp_set(struct lan966x_port *port, struct ifreq *ifr)
+1 -2
drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c
··· 322 322 323 323 if (netif_is_bridge_master(info->upper_dev) && !info->linking) 324 324 switchdev_bridge_port_unoffload(port->dev, port, 325 - &lan966x_switchdev_nb, 326 - &lan966x_switchdev_blocking_nb); 325 + NULL, NULL); 327 326 328 327 return NOTIFY_DONE; 329 328 }
-8
drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c
··· 57 57 #define TSE_PCS_USE_SGMII_ENA BIT(0) 58 58 #define TSE_PCS_IF_USE_SGMII 0x03 59 59 60 - #define SGMII_ADAPTER_CTRL_REG 0x00 61 - #define SGMII_ADAPTER_DISABLE 0x0001 62 - #define SGMII_ADAPTER_ENABLE 0x0000 63 - 64 60 #define AUTONEGO_LINK_TIMER 20 65 61 66 62 static int tse_pcs_reset(void __iomem *base, struct tse_pcs *pcs) ··· 198 202 unsigned int speed) 199 203 { 200 204 void __iomem *tse_pcs_base = pcs->tse_pcs_base; 201 - void __iomem *sgmii_adapter_base = pcs->sgmii_adapter_base; 202 205 u32 val; 203 - 204 - writew(SGMII_ADAPTER_ENABLE, 205 - sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG); 206 206 207 207 pcs->autoneg = phy_dev->autoneg; 208 208
+4
drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.h
··· 10 10 #include <linux/phy.h> 11 11 #include <linux/timer.h> 12 12 13 + #define SGMII_ADAPTER_CTRL_REG 0x00 14 + #define SGMII_ADAPTER_ENABLE 0x0000 15 + #define SGMII_ADAPTER_DISABLE 0x0001 16 + 13 17 struct tse_pcs { 14 18 struct device *dev; 15 19 void __iomem *tse_pcs_base;
+5 -8
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
··· 18 18 19 19 #include "altr_tse_pcs.h" 20 20 21 - #define SGMII_ADAPTER_CTRL_REG 0x00 22 - #define SGMII_ADAPTER_DISABLE 0x0001 23 - 24 21 #define SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_GMII_MII 0x0 25 22 #define SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RGMII 0x1 26 23 #define SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RMII 0x2 ··· 59 62 { 60 63 struct socfpga_dwmac *dwmac = (struct socfpga_dwmac *)priv; 61 64 void __iomem *splitter_base = dwmac->splitter_base; 62 - void __iomem *tse_pcs_base = dwmac->pcs.tse_pcs_base; 63 65 void __iomem *sgmii_adapter_base = dwmac->pcs.sgmii_adapter_base; 64 66 struct device *dev = dwmac->dev; 65 67 struct net_device *ndev = dev_get_drvdata(dev); 66 68 struct phy_device *phy_dev = ndev->phydev; 67 69 u32 val; 68 70 69 - if ((tse_pcs_base) && (sgmii_adapter_base)) 70 - writew(SGMII_ADAPTER_DISABLE, 71 - sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG); 71 + writew(SGMII_ADAPTER_DISABLE, 72 + sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG); 72 73 73 74 if (splitter_base) { 74 75 val = readl(splitter_base + EMAC_SPLITTER_CTRL_REG); ··· 88 93 writel(val, splitter_base + EMAC_SPLITTER_CTRL_REG); 89 94 } 90 95 91 - if (tse_pcs_base && sgmii_adapter_base) 96 + writew(SGMII_ADAPTER_ENABLE, 97 + sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG); 98 + if (phy_dev) 92 99 tse_pcs_fix_mac_speed(&dwmac->pcs, phy_dev, speed); 93 100 } 94 101
+6 -2
drivers/net/macvlan.c
··· 460 460 return RX_HANDLER_CONSUMED; 461 461 *pskb = skb; 462 462 eth = eth_hdr(skb); 463 - if (macvlan_forward_source(skb, port, eth->h_source)) 463 + if (macvlan_forward_source(skb, port, eth->h_source)) { 464 + kfree_skb(skb); 464 465 return RX_HANDLER_CONSUMED; 466 + } 465 467 src = macvlan_hash_lookup(port, eth->h_source); 466 468 if (src && src->mode != MACVLAN_MODE_VEPA && 467 469 src->mode != MACVLAN_MODE_BRIDGE) { ··· 482 480 return RX_HANDLER_PASS; 483 481 } 484 482 485 - if (macvlan_forward_source(skb, port, eth->h_source)) 483 + if (macvlan_forward_source(skb, port, eth->h_source)) { 484 + kfree_skb(skb); 486 485 return RX_HANDLER_CONSUMED; 486 + } 487 487 if (macvlan_passthru(port)) 488 488 vlan = list_first_or_null_rcu(&port->vlans, 489 489 struct macvlan_dev, list);
+5
drivers/net/mdio/fwnode_mdio.c
··· 43 43 int rc; 44 44 45 45 rc = fwnode_irq_get(child, 0); 46 + /* Don't wait forever if the IRQ provider doesn't become available, 47 + * just fall back to poll mode 48 + */ 49 + if (rc == -EPROBE_DEFER) 50 + rc = driver_deferred_probe_check_state(&phy->mdio.dev); 46 51 if (rc == -EPROBE_DEFER) 47 52 return rc; 48 53
+1 -6
drivers/net/phy/microchip_t1.c
··· 706 706 static int lan87xx_config_aneg(struct phy_device *phydev) 707 707 { 708 708 u16 ctl = 0; 709 - int rc; 710 709 711 710 switch (phydev->master_slave_set) { 712 711 case MASTER_SLAVE_CFG_MASTER_FORCE: ··· 721 722 return -EOPNOTSUPP; 722 723 } 723 724 724 - rc = phy_modify_changed(phydev, MII_CTRL1000, CTL1000_AS_MASTER, ctl); 725 - if (rc == 1) 726 - rc = genphy_soft_reset(phydev); 727 - 728 - return rc; 725 + return phy_modify_changed(phydev, MII_CTRL1000, CTL1000_AS_MASTER, ctl); 729 726 } 730 727 731 728 static struct phy_driver microchip_t1_phy_driver[] = {
+1 -1
drivers/net/tun.c
··· 1124 1124 1125 1125 /* NETIF_F_LLTX requires to do our own update of trans_start */ 1126 1126 queue = netdev_get_tx_queue(dev, txq); 1127 - queue->trans_start = jiffies; 1127 + txq_trans_cond_update(queue); 1128 1128 1129 1129 /* Notify and wake up reader process */ 1130 1130 if (tfile->flags & TUN_FASYNC)
+1 -1
drivers/net/veth.c
··· 320 320 321 321 rcu_read_lock(); 322 322 rcv = rcu_dereference(priv->peer); 323 - if (unlikely(!rcv)) { 323 + if (unlikely(!rcv) || !pskb_may_pull(skb, ETH_HLEN)) { 324 324 kfree_skb(skb); 325 325 goto drop; 326 326 }
+2 -2
drivers/net/vxlan/vxlan_core.c
··· 651 651 652 652 rd = kmalloc(sizeof(*rd), GFP_ATOMIC); 653 653 if (rd == NULL) 654 - return -ENOBUFS; 654 + return -ENOMEM; 655 655 656 656 if (dst_cache_init(&rd->dst_cache, GFP_ATOMIC)) { 657 657 kfree(rd); 658 - return -ENOBUFS; 658 + return -ENOMEM; 659 659 } 660 660 661 661 rd->remote_ip = *ip;
+14 -8
drivers/net/wireless/ath/ath11k/mac.c
··· 3136 3136 arvif->do_not_send_tmpl = true; 3137 3137 else 3138 3138 arvif->do_not_send_tmpl = false; 3139 + 3140 + if (vif->bss_conf.he_support) { 3141 + ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, 3142 + WMI_VDEV_PARAM_BA_MODE, 3143 + WMI_BA_MODE_BUFFER_SIZE_256); 3144 + if (ret) 3145 + ath11k_warn(ar->ab, 3146 + "failed to set BA BUFFER SIZE 256 for vdev: %d\n", 3147 + arvif->vdev_id); 3148 + else 3149 + ath11k_dbg(ar->ab, ATH11K_DBG_MAC, 3150 + "Set BA BUFFER SIZE 256 for VDEV: %d\n", 3151 + arvif->vdev_id); 3152 + } 3139 3153 } 3140 3154 3141 3155 if (changed & (BSS_CHANGED_BEACON_INFO | BSS_CHANGED_BEACON)) { ··· 3185 3171 3186 3172 if (arvif->is_up && vif->bss_conf.he_support && 3187 3173 vif->bss_conf.he_oper.params) { 3188 - ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, 3189 - WMI_VDEV_PARAM_BA_MODE, 3190 - WMI_BA_MODE_BUFFER_SIZE_256); 3191 - if (ret) 3192 - ath11k_warn(ar->ab, 3193 - "failed to set BA BUFFER SIZE 256 for vdev: %d\n", 3194 - arvif->vdev_id); 3195 - 3196 3174 param_id = WMI_VDEV_PARAM_HEOPS_0_31; 3197 3175 param_value = vif->bss_conf.he_oper.params; 3198 3176 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
+1 -1
drivers/net/wireless/ath/ath9k/main.c
··· 839 839 continue; 840 840 841 841 txinfo = IEEE80211_SKB_CB(bf->bf_mpdu); 842 - fi = (struct ath_frame_info *)&txinfo->rate_driver_data[0]; 842 + fi = (struct ath_frame_info *)&txinfo->status.status_driver_data[0]; 843 843 if (fi->keyix == keyix) 844 844 return true; 845 845 }
+21 -12
drivers/net/wireless/ath/ath9k/xmit.c
··· 141 141 { 142 142 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); 143 143 BUILD_BUG_ON(sizeof(struct ath_frame_info) > 144 - sizeof(tx_info->rate_driver_data)); 145 - return (struct ath_frame_info *) &tx_info->rate_driver_data[0]; 144 + sizeof(tx_info->status.status_driver_data)); 145 + return (struct ath_frame_info *) &tx_info->status.status_driver_data[0]; 146 146 } 147 147 148 148 static void ath_send_bar(struct ath_atx_tid *tid, u16 seqno) ··· 2542 2542 spin_unlock_irqrestore(&sc->tx.txbuflock, flags); 2543 2543 } 2544 2544 2545 + static void ath_clear_tx_status(struct ieee80211_tx_info *tx_info) 2546 + { 2547 + void *ptr = &tx_info->status; 2548 + 2549 + memset(ptr + sizeof(tx_info->status.rates), 0, 2550 + sizeof(tx_info->status) - 2551 + sizeof(tx_info->status.rates) - 2552 + sizeof(tx_info->status.status_driver_data)); 2553 + } 2554 + 2545 2555 static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf, 2546 2556 struct ath_tx_status *ts, int nframes, int nbad, 2547 2557 int txok) ··· 2562 2552 struct ieee80211_hw *hw = sc->hw; 2563 2553 struct ath_hw *ah = sc->sc_ah; 2564 2554 u8 i, tx_rateindex; 2555 + 2556 + ath_clear_tx_status(tx_info); 2565 2557 2566 2558 if (txok) 2567 2559 tx_info->status.ack_signal = ts->ts_rssi; ··· 2578 2566 } 2579 2567 tx_info->status.ampdu_len = nframes; 2580 2568 tx_info->status.ampdu_ack_len = nframes - nbad; 2569 + 2570 + tx_info->status.rates[tx_rateindex].count = ts->ts_longretry + 1; 2571 + 2572 + for (i = tx_rateindex + 1; i < hw->max_rates; i++) { 2573 + tx_info->status.rates[i].count = 0; 2574 + tx_info->status.rates[i].idx = -1; 2575 + } 2581 2576 2582 2577 if ((ts->ts_status & ATH9K_TXERR_FILT) == 0 && 2583 2578 (tx_info->flags & IEEE80211_TX_CTL_NO_ACK) == 0) { ··· 2607 2588 tx_info->status.rates[tx_rateindex].count = 2608 2589 hw->max_rate_tries; 2609 2590 } 2610 - 2611 - for (i = tx_rateindex + 1; i < hw->max_rates; i++) { 2612 - tx_info->status.rates[i].count = 0; 2613 - tx_info->status.rates[i].idx = -1; 2614 - } 2615 - 2616 - tx_info->status.rates[tx_rateindex].count = ts->ts_longretry + 1; 2617 - 2618 - /* we report airtime in ath_tx_count_airtime(), don't report twice */ 2619 - tx_info->status.tx_time = 0; 2620 2591 } 2621 2592 2622 2593 static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq)
+1 -1
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
··· 557 557 BRCMF_SDIO_FT_SUB, 558 558 }; 559 559 560 - #define SDIOD_DRVSTR_KEY(chip, pmu) (((chip) << 16) | (pmu)) 560 + #define SDIOD_DRVSTR_KEY(chip, pmu) (((unsigned int)(chip) << 16) | (pmu)) 561 561 562 562 /* SDIO Pad drive strength to select value mappings */ 563 563 struct sdiod_drive_str {
+1 -1
drivers/net/wireless/mediatek/mt76/mt76x2/pci.c
··· 80 80 mt76_rmw_field(dev, 0x15a10, 0x1f << 16, 0x9); 81 81 82 82 /* RG_SSUSB_G1_CDR_BIC_LTR = 0xf */ 83 - mt76_rmw_field(dev, 0x15a0c, 0xf << 28, 0xf); 83 + mt76_rmw_field(dev, 0x15a0c, 0xfU << 28, 0xf); 84 84 85 85 /* RG_SSUSB_CDR_BR_PE1D = 0x3 */ 86 86 mt76_rmw_field(dev, 0x15c58, 0x3 << 6, 0x3);
+2
include/net/flow_dissector.h
··· 59 59 __be16 vlan_tci; 60 60 }; 61 61 __be16 vlan_tpid; 62 + __be16 vlan_eth_type; 63 + u16 padding; 62 64 }; 63 65 64 66 struct flow_dissector_mpls_lse {
+2 -1
net/core/flow_dissector.c
··· 1032 1032 key_eth_addrs = skb_flow_dissector_target(flow_dissector, 1033 1033 FLOW_DISSECTOR_KEY_ETH_ADDRS, 1034 1034 target_container); 1035 - memcpy(key_eth_addrs, &eth->h_dest, sizeof(*key_eth_addrs)); 1035 + memcpy(key_eth_addrs, eth, sizeof(*key_eth_addrs)); 1036 1036 } 1037 1037 1038 1038 proto_again: ··· 1183 1183 VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT; 1184 1184 } 1185 1185 key_vlan->vlan_tpid = saved_vlan_tpid; 1186 + key_vlan->vlan_eth_type = proto; 1186 1187 } 1187 1188 1188 1189 fdret = FLOW_DISSECT_RET_PROTO_AGAIN;
+3
net/core/rtnetlink.c
··· 5242 5242 *prividx = attr_id_l3_stats; 5243 5243 5244 5244 size_l3 = rtnl_offload_xstats_get_size_stats(dev, t_l3); 5245 + if (!size_l3) 5246 + goto skip_l3_stats; 5245 5247 attr = nla_reserve_64bit(skb, attr_id_l3_stats, size_l3, 5246 5248 IFLA_OFFLOAD_XSTATS_UNSPEC); 5247 5249 if (!attr) ··· 5255 5253 return err; 5256 5254 5257 5255 have_data = true; 5256 + skip_l3_stats: 5258 5257 *prividx = 0; 5259 5258 } 5260 5259
+10 -13
net/dsa/dsa2.c
··· 562 562 { 563 563 struct devlink_port *dlp = &dp->devlink_port; 564 564 struct dsa_switch *ds = dp->ds; 565 - struct net_device *slave; 566 565 567 566 if (!dp->setup) 568 567 return; ··· 583 584 dsa_port_link_unregister_of(dp); 584 585 break; 585 586 case DSA_PORT_TYPE_USER: 586 - slave = dp->slave; 587 - 588 - if (slave) { 587 + if (dp->slave) { 588 + dsa_slave_destroy(dp->slave); 589 589 dp->slave = NULL; 590 - dsa_slave_destroy(slave); 591 590 } 592 591 break; 593 592 } ··· 1144 1147 if (err) 1145 1148 goto teardown_cpu_ports; 1146 1149 1147 - err = dsa_tree_setup_master(dst); 1150 + err = dsa_tree_setup_ports(dst); 1148 1151 if (err) 1149 1152 goto teardown_switches; 1150 1153 1151 - err = dsa_tree_setup_ports(dst); 1154 + err = dsa_tree_setup_master(dst); 1152 1155 if (err) 1153 - goto teardown_master; 1156 + goto teardown_ports; 1154 1157 1155 1158 err = dsa_tree_setup_lags(dst); 1156 1159 if (err) 1157 - goto teardown_ports; 1160 + goto teardown_master; 1158 1161 1159 1162 dst->setup = true; 1160 1163 ··· 1162 1165 1163 1166 return 0; 1164 1167 1165 - teardown_ports: 1166 - dsa_tree_teardown_ports(dst); 1167 1168 teardown_master: 1168 1169 dsa_tree_teardown_master(dst); 1170 + teardown_ports: 1171 + dsa_tree_teardown_ports(dst); 1169 1172 teardown_switches: 1170 1173 dsa_tree_teardown_switches(dst); 1171 1174 teardown_cpu_ports: ··· 1183 1186 1184 1187 dsa_tree_teardown_lags(dst); 1185 1188 1186 - dsa_tree_teardown_ports(dst); 1187 - 1188 1189 dsa_tree_teardown_master(dst); 1190 + 1191 + dsa_tree_teardown_ports(dst); 1189 1192 1190 1193 dsa_tree_teardown_switches(dst); 1191 1194
+1 -1
net/ipv6/ip6_output.c
··· 485 485 goto drop; 486 486 487 487 if (!net->ipv6.devconf_all->disable_policy && 488 - !idev->cnf.disable_policy && 488 + (!idev || !idev->cnf.disable_policy) && 489 489 !xfrm6_policy_check(NULL, XFRM_POLICY_FWD, skb)) { 490 490 __IP6_INC_STATS(net, idev, IPSTATS_MIB_INDISCARDS); 491 491 goto drop;
+1 -1
net/mac80211/debugfs_sta.c
··· 441 441 #define PRINT_HT_CAP(_cond, _str) \ 442 442 do { \ 443 443 if (_cond) \ 444 - p += scnprintf(p, sizeof(buf)+buf-p, "\t" _str "\n"); \ 444 + p += scnprintf(p, bufsz + buf - p, "\t" _str "\n"); \ 445 445 } while (0) 446 446 char *buf, *p; 447 447 int i;
+1 -1
net/netfilter/nf_tables_api.c
··· 9363 9363 } 9364 9364 EXPORT_SYMBOL_GPL(nft_parse_u32_check); 9365 9365 9366 - static unsigned int nft_parse_register(const struct nlattr *attr, u32 *preg) 9366 + static int nft_parse_register(const struct nlattr *attr, u32 *preg) 9367 9367 { 9368 9368 unsigned int reg; 9369 9369
+3 -4
net/netfilter/nft_socket.c
··· 37 37 38 38 #ifdef CONFIG_SOCK_CGROUP_DATA 39 39 static noinline bool 40 - nft_sock_get_eval_cgroupv2(u32 *dest, const struct nft_pktinfo *pkt, u32 level) 40 + nft_sock_get_eval_cgroupv2(u32 *dest, struct sock *sk, const struct nft_pktinfo *pkt, u32 level) 41 41 { 42 - struct sock *sk = skb_to_full_sk(pkt->skb); 43 42 struct cgroup *cgrp; 44 43 45 - if (!sk || !sk_fullsock(sk) || !net_eq(nft_net(pkt), sock_net(sk))) 44 + if (!sk_fullsock(sk)) 46 45 return false; 47 46 48 47 cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data); ··· 108 109 break; 109 110 #ifdef CONFIG_SOCK_CGROUP_DATA 110 111 case NFT_SOCKET_CGROUPV2: 111 - if (!nft_sock_get_eval_cgroupv2(dest, pkt, priv->level)) { 112 + if (!nft_sock_get_eval_cgroupv2(dest, sk, pkt, priv->level)) { 112 113 regs->verdict.code = NFT_BREAK; 113 114 return; 114 115 }
+4
net/nfc/nci/core.c
··· 560 560 mutex_lock(&ndev->req_lock); 561 561 562 562 if (!test_and_clear_bit(NCI_UP, &ndev->flags)) { 563 + /* Need to flush the cmd wq in case 564 + * there is a queued/running cmd_work 565 + */ 566 + flush_workqueue(ndev->cmd_wq); 563 567 del_timer_sync(&ndev->cmd_timer); 564 568 del_timer_sync(&ndev->data_timer); 565 569 mutex_unlock(&ndev->req_lock);
+1 -1
net/sched/cls_api.c
··· 1672 1672 if (chain->flushing) 1673 1673 return -EAGAIN; 1674 1674 1675 + RCU_INIT_POINTER(tp->next, tcf_chain_tp_prev(chain, chain_info)); 1675 1676 if (*chain_info->pprev == chain->filter_chain) 1676 1677 tcf_chain0_head_change(chain, tp); 1677 1678 tcf_proto_get(tp); 1678 - RCU_INIT_POINTER(tp->next, tcf_chain_tp_prev(chain, chain_info)); 1679 1679 rcu_assign_pointer(*chain_info->pprev, tp); 1680 1680 1681 1681 return 0;
+13 -5
net/sched/cls_flower.c
··· 1013 1013 static void fl_set_key_vlan(struct nlattr **tb, 1014 1014 __be16 ethertype, 1015 1015 int vlan_id_key, int vlan_prio_key, 1016 + int vlan_next_eth_type_key, 1016 1017 struct flow_dissector_key_vlan *key_val, 1017 1018 struct flow_dissector_key_vlan *key_mask) 1018 1019 { ··· 1032 1031 } 1033 1032 key_val->vlan_tpid = ethertype; 1034 1033 key_mask->vlan_tpid = cpu_to_be16(~0); 1034 + if (tb[vlan_next_eth_type_key]) { 1035 + key_val->vlan_eth_type = 1036 + nla_get_be16(tb[vlan_next_eth_type_key]); 1037 + key_mask->vlan_eth_type = cpu_to_be16(~0); 1038 + } 1035 1039 } 1036 1040 1037 1041 static void fl_set_key_flag(u32 flower_key, u32 flower_mask, ··· 1608 1602 1609 1603 if (eth_type_vlan(ethertype)) { 1610 1604 fl_set_key_vlan(tb, ethertype, TCA_FLOWER_KEY_VLAN_ID, 1611 - TCA_FLOWER_KEY_VLAN_PRIO, &key->vlan, 1612 - &mask->vlan); 1605 + TCA_FLOWER_KEY_VLAN_PRIO, 1606 + TCA_FLOWER_KEY_VLAN_ETH_TYPE, 1607 + &key->vlan, &mask->vlan); 1613 1608 1614 1609 if (tb[TCA_FLOWER_KEY_VLAN_ETH_TYPE]) { 1615 1610 ethertype = nla_get_be16(tb[TCA_FLOWER_KEY_VLAN_ETH_TYPE]); ··· 1618 1611 fl_set_key_vlan(tb, ethertype, 1619 1612 TCA_FLOWER_KEY_CVLAN_ID, 1620 1613 TCA_FLOWER_KEY_CVLAN_PRIO, 1614 + TCA_FLOWER_KEY_CVLAN_ETH_TYPE, 1621 1615 &key->cvlan, &mask->cvlan); 1622 1616 fl_set_key_val(tb, &key->basic.n_proto, 1623 1617 TCA_FLOWER_KEY_CVLAN_ETH_TYPE, ··· 3010 3002 goto nla_put_failure; 3011 3003 3012 3004 if (mask->basic.n_proto) { 3013 - if (mask->cvlan.vlan_tpid) { 3005 + if (mask->cvlan.vlan_eth_type) { 3014 3006 if (nla_put_be16(skb, TCA_FLOWER_KEY_CVLAN_ETH_TYPE, 3015 3007 key->basic.n_proto)) 3016 3008 goto nla_put_failure; 3017 - } else if (mask->vlan.vlan_tpid) { 3009 + } else if (mask->vlan.vlan_eth_type) { 3018 3010 if (nla_put_be16(skb, TCA_FLOWER_KEY_VLAN_ETH_TYPE, 3019 - key->basic.n_proto)) 3011 + key->vlan.vlan_eth_type)) 3020 3012 goto nla_put_failure; 3021 3013 } 3022 3014 }
+2 -1
net/sched/sch_taprio.c
··· 417 417 { 418 418 struct taprio_sched *q = qdisc_priv(sch); 419 419 420 - if (skb->sk && sock_flag(skb->sk, SOCK_TXTIME)) { 420 + /* sk_flags are only safe to use on full sockets. */ 421 + if (skb->sk && sk_fullsock(skb->sk) && sock_flag(skb->sk, SOCK_TXTIME)) { 421 422 if (!is_valid_interval(skb, sch)) 422 423 return qdisc_drop(skb, sch, to_free); 423 424 } else if (TXTIME_ASSIST_IS_ENABLED(q->flags)) {
+3 -3
net/sctp/sm_statefuns.c
··· 781 781 } 782 782 } 783 783 784 - if (security_sctp_assoc_request(new_asoc, chunk->skb)) { 784 + if (security_sctp_assoc_request(new_asoc, chunk->head_skb ?: chunk->skb)) { 785 785 sctp_association_free(new_asoc); 786 786 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); 787 787 } ··· 932 932 933 933 /* Set peer label for connection. */ 934 934 if (security_sctp_assoc_established((struct sctp_association *)asoc, 935 - chunk->skb)) 935 + chunk->head_skb ?: chunk->skb)) 936 936 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); 937 937 938 938 /* Verify that the chunk length for the COOKIE-ACK is OK. ··· 2262 2262 } 2263 2263 2264 2264 /* Update socket peer label if first association. */ 2265 - if (security_sctp_assoc_request(new_asoc, chunk->skb)) { 2265 + if (security_sctp_assoc_request(new_asoc, chunk->head_skb ?: chunk->skb)) { 2266 2266 sctp_association_free(new_asoc); 2267 2267 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); 2268 2268 }
+1 -1
net/sctp/socket.c
··· 5636 5636 * Set the daddr and initialize id to something more random and also 5637 5637 * copy over any ip options. 5638 5638 */ 5639 - sp->pf->to_sk_daddr(&asoc->peer.primary_addr, sk); 5639 + sp->pf->to_sk_daddr(&asoc->peer.primary_addr, sock->sk); 5640 5640 sp->pf->copy_ip_options(sk, sock->sk); 5641 5641 5642 5642 /* Populate the fields of the newsk from the oldsk and migrate the
+12 -2
net/smc/af_smc.c
··· 121 121 bool *own_req) 122 122 { 123 123 struct smc_sock *smc; 124 + struct sock *child; 124 125 125 126 smc = smc_clcsock_user_data(sk); 126 127 ··· 135 134 } 136 135 137 136 /* passthrough to original syn recv sock fct */ 138 - return smc->ori_af_ops->syn_recv_sock(sk, skb, req, dst, req_unhash, 139 - own_req); 137 + child = smc->ori_af_ops->syn_recv_sock(sk, skb, req, dst, req_unhash, 138 + own_req); 139 + /* child must not inherit smc or its ops */ 140 + if (child) { 141 + rcu_assign_sk_user_data(child, NULL); 142 + 143 + /* v4-mapped sockets don't inherit parent ops. Don't restore. */ 144 + if (inet_csk(child)->icsk_af_ops == inet_csk(sk)->icsk_af_ops) 145 + inet_csk(child)->icsk_af_ops = smc->ori_af_ops; 146 + } 147 + return child; 140 148 141 149 drop: 142 150 dst_release(dst);
+4 -2
net/smc/smc_clc.c
··· 191 191 flags, SMC_NETLINK_DUMP_UEID); 192 192 if (!hdr) 193 193 return -ENOMEM; 194 - snprintf(ueid_str, sizeof(ueid_str), "%s", ueid); 194 + memcpy(ueid_str, ueid, SMC_MAX_EID_LEN); 195 + ueid_str[SMC_MAX_EID_LEN] = 0; 195 196 if (nla_put_string(skb, SMC_NLA_EID_TABLE_ENTRY, ueid_str)) { 196 197 genlmsg_cancel(skb, hdr); 197 198 return -EMSGSIZE; ··· 253 252 goto end; 254 253 255 254 smc_ism_get_system_eid(&seid); 256 - snprintf(seid_str, sizeof(seid_str), "%s", seid); 255 + memcpy(seid_str, seid, SMC_MAX_EID_LEN); 256 + seid_str[SMC_MAX_EID_LEN] = 0; 257 257 if (nla_put_string(skb, SMC_NLA_SEID_ENTRY, seid_str)) 258 258 goto err; 259 259 read_lock(&smc_clc_eid_table.lock);
+3 -2
net/smc/smc_pnet.c
··· 311 311 list_for_each_entry(ibdev, &smc_ib_devices.list, list) { 312 312 if (!strncmp(ibdev->ibdev->name, ib_name, 313 313 sizeof(ibdev->ibdev->name)) || 314 - !strncmp(dev_name(ibdev->ibdev->dev.parent), ib_name, 315 - IB_DEVICE_NAME_MAX - 1)) { 314 + (ibdev->ibdev->dev.parent && 315 + !strncmp(dev_name(ibdev->ibdev->dev.parent), ib_name, 316 + IB_DEVICE_NAME_MAX - 1))) { 316 317 goto out; 317 318 } 318 319 }
+2 -1
net/wireless/nl80211.c
··· 528 528 .len = IEEE80211_MAX_MESH_ID_LEN }, 529 529 [NL80211_ATTR_MPATH_NEXT_HOP] = NLA_POLICY_ETH_ADDR_COMPAT, 530 530 531 - [NL80211_ATTR_REG_ALPHA2] = { .type = NLA_STRING, .len = 2 }, 531 + /* allow 3 for NUL-termination, we used to declare this NLA_STRING */ 532 + [NL80211_ATTR_REG_ALPHA2] = NLA_POLICY_RANGE(NLA_BINARY, 2, 3), 532 533 [NL80211_ATTR_REG_RULES] = { .type = NLA_NESTED }, 533 534 534 535 [NL80211_ATTR_BSS_CTS_PROT] = { .type = NLA_U8 },
+2
net/wireless/scan.c
··· 2018 2018 /* this is a nontransmitting bss, we need to add it to 2019 2019 * transmitting bss' list if it is not there 2020 2020 */ 2021 + spin_lock_bh(&rdev->bss_lock); 2021 2022 if (cfg80211_add_nontrans_list(non_tx_data->tx_bss, 2022 2023 &res->pub)) { 2023 2024 if (__cfg80211_unlink_bss(rdev, res)) 2024 2025 rdev->bss_generation++; 2025 2026 } 2027 + spin_unlock_bh(&rdev->bss_lock); 2026 2028 } 2027 2029 2028 2030 trace_cfg80211_return_bss(&res->pub);