Commit fa2e1ba3 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull networking fixes from Jakub Kicinski:
 "Including fixes from netfilter, bpf.

  Quite a handful of old regression fixes but most of those are
  pre-5.16.

  Current release - regressions:

   - fix memory leaks in the skb free deferral scheme if upper layer
     protocols are used, i.e. in-kernel TCP readers like TLS

  Current release - new code bugs:

   - nf_tables: fix NULL check typo in _clone() functions

   - change the default to y for Vertexcom vendor Kconfig

   - a couple of fixes to incorrect uses of ref tracking

   - two fixes for constifying netdev->dev_addr

  Previous releases - regressions:

   - bpf:
      - various verifier fixes mainly around register offset handling
        when passed to helper functions
      - fix mount source displayed for bpffs (none -> bpffs)

   - bonding:
      - fix extraction of ports for connection hash calculation
      - fix bond_xmit_broadcast return value when some devices are down

   - phy: marvell: add Marvell specific PHY loopback

   - sch_api: don't skip qdisc attach on ingress, prevent ref leak

   - htb: restore minimal packet size handling in rate control

   - sfp: fix high power modules without diagnostic monitoring

   - mscc: ocelot:
      - don't let phylink re-enable TX PAUSE on the NPI port
      - don't dereference NULL pointers with shared tc filters

   - smsc95xx: correct reset handling for LAN9514

   - cpsw: avoid alignment faults by taking NET_IP_ALIGN into account

   - phy: micrel: use kszphy_suspend/_resume for irq aware devices,
     avoid races with the interrupt

  Previous releases - always broken:

   - xdp: check prog type before updating BPF link

   - smc: resolve various races around abnormal connection termination

   - sit: allow encapsulated IPv6 traffic to be delivered locally

   - axienet: fix init/reset handling, add missing barriers, read the
     right status words, stop queues correctly

   - add missing dev_put() in sock_timestamping_bind_phc()

  Misc:

   - ipv4: prevent accidentally passing RTO_ONLINK to
     ip_route_output_key_hash() by sanitizing flags

   - ipv4: avoid quadratic behavior in netns dismantle

   - stmmac: dwmac-oxnas: add support for OX810SE

   - fsl: xgmac_mdio: add workaround for erratum A-009885"

* tag 'net-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (92 commits)
  ipv4: add net_hash_mix() dispersion to fib_info_laddrhash keys
  ipv4: avoid quadratic behavior in netns dismantle
  net/fsl: xgmac_mdio: Fix incorrect iounmap when removing module
  powerpc/fsl/dts: Enable WA for erratum A-009885 on fman3l MDIO buses
  dt-bindings: net: Document fsl,erratum-a009885
  net/fsl: xgmac_mdio: Add workaround for erratum A-009885
  net: mscc: ocelot: fix using match before it is set
  net: phy: micrel: use kszphy_suspend()/kszphy_resume for irq aware devices
  net: cpsw: avoid alignment faults by taking NET_IP_ALIGN into account
  nfc: llcp: fix NULL error pointer dereference on sendmsg() after failed bind()
  net: axienet: increase default TX ring size to 128
  net: axienet: fix for TX busy handling
  net: axienet: fix number of TX ring slots for available check
  net: axienet: Fix TX ring slot available check
  net: axienet: limit minimum TX ring size
  net: axienet: add missing memory barriers
  net: axienet: reset core on initialization prior to MDIO access
  net: axienet: Wait for PhyRstCmplt after core reset
  net: axienet: increase reset timeout
  bpf, selftests: Add ringbuf memory type confusion test
  ...
parents f4484d13 ff9fc0a3
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -410,6 +410,15 @@ PROPERTIES
		The settings and programming routines for internal/external
		MDIO are different. Must be included for internal MDIO.

- fsl,erratum-a009885
		Usage: optional
		Value type: <boolean>
		Definition: Indicates the presence of the A009885
		erratum describing that the contents of MDIO_DATA may
		become corrupt unless it is read within 16 MDC cycles
		of MDIO_CFG[BSY] being cleared, when performing an
		MDIO read operation.

- fsl,erratum-a011043
		Usage: optional
		Value type: <boolean>
+3 −0
Original line number Diff line number Diff line
@@ -9,6 +9,9 @@ Required properties on all platforms:
- compatible:	For the OX820 SoC, it should be :
		- "oxsemi,ox820-dwmac" to select glue
		- "snps,dwmac-3.512" to select IP version.
		For the OX810SE SoC, it should be :
		- "oxsemi,ox810se-dwmac" to select glue
		- "snps,dwmac-3.512" to select IP version.

- clocks: Should contain phandles to the following clocks
- clock-names:	Should contain the following:
+2 −0
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ mdio0: mdio@fc000 {
		#size-cells = <0>;
		compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
		reg = <0xfc000 0x1000>;
		fsl,erratum-a009885;
	};

	xmdio0: mdio@fd000 {
@@ -86,6 +87,7 @@ xmdio0: mdio@fd000 {
		#size-cells = <0>;
		compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
		reg = <0xfd000 0x1000>;
		fsl,erratum-a009885;
	};
};

+1 −3
Original line number Diff line number Diff line
@@ -178,7 +178,6 @@ static void ia_hack_tcq(IADEV *dev) {

static u16 get_desc (IADEV *dev, struct ia_vcc *iavcc) {
  u_short 		desc_num, i;
  struct sk_buff        *skb;
  struct ia_vcc         *iavcc_r = NULL; 
  unsigned long delta;
  static unsigned long timer = 0;
@@ -202,8 +201,7 @@ static u16 get_desc (IADEV *dev, struct ia_vcc *iavcc) {
           else 
              dev->ffL.tcq_rd -= 2;
           *(u_short *)(dev->seg_ram + dev->ffL.tcq_rd) = i+1;
           if (!(skb = dev->desc_tbl[i].txskb) || 
                          !(iavcc_r = dev->desc_tbl[i].iavcc))
           if (!dev->desc_tbl[i].txskb || !(iavcc_r = dev->desc_tbl[i].iavcc))
              printk("Fatal err, desc table vcc or skb is NULL\n");
           else 
              iavcc_r->vc_desc_cnt--;
+24 −10
Original line number Diff line number Diff line
@@ -3874,8 +3874,8 @@ u32 bond_xmit_hash(struct bonding *bond, struct sk_buff *skb)
	    skb->l4_hash)
		return skb->hash;

	return __bond_xmit_hash(bond, skb, skb->head, skb->protocol,
				skb->mac_header, skb->network_header,
	return __bond_xmit_hash(bond, skb, skb->data, skb->protocol,
				skb_mac_offset(skb), skb_network_offset(skb),
				skb_headlen(skb));
}

@@ -4884,25 +4884,39 @@ static netdev_tx_t bond_xmit_broadcast(struct sk_buff *skb,
	struct bonding *bond = netdev_priv(bond_dev);
	struct slave *slave = NULL;
	struct list_head *iter;
	bool xmit_suc = false;
	bool skb_used = false;

	bond_for_each_slave_rcu(bond, slave, iter) {
		if (bond_is_last_slave(bond, slave))
			break;
		if (bond_slave_is_up(slave) && slave->link == BOND_LINK_UP) {
			struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);
		struct sk_buff *skb2;

		if (!(bond_slave_is_up(slave) && slave->link == BOND_LINK_UP))
			continue;

		if (bond_is_last_slave(bond, slave)) {
			skb2 = skb;
			skb_used = true;
		} else {
			skb2 = skb_clone(skb, GFP_ATOMIC);
			if (!skb2) {
				net_err_ratelimited("%s: Error: %s: skb_clone() failed\n",
						    bond_dev->name, __func__);
				continue;
			}
			bond_dev_queue_xmit(bond, skb2, slave->dev);
		}

		if (bond_dev_queue_xmit(bond, skb2, slave->dev) == NETDEV_TX_OK)
			xmit_suc = true;
	}
	if (slave && bond_slave_is_up(slave) && slave->link == BOND_LINK_UP)
		return bond_dev_queue_xmit(bond, skb, slave->dev);

	return bond_tx_drop(bond_dev, skb);
	if (!skb_used)
		dev_kfree_skb_any(skb);

	if (xmit_suc)
		return NETDEV_TX_OK;

	atomic_long_inc(&bond_dev->tx_dropped);
	return NET_XMIT_DROP;
}

/*------------------------- Device initialization ---------------------------*/
Loading