Commit cfaaa7d0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull networking fixes from Paolo Abeni:
 "Including fixes from bluetooth.

  Quite calm week. No new regression under investigation.

  Current release - regressions:

   - eth: revert "igb: Disable threaded IRQ for igb_msix_other"

  Current release - new code bugs:

   - bluetooth: btintel: direct exception event to bluetooth stack

  Previous releases - regressions:

   - core: fix data-races around sk->sk_forward_alloc

   - netlink: terminate outstanding dump on socket close

   - mptcp: error out earlier on disconnect

   - vsock: fix accept_queue memory leak

   - phylink: ensure PHY momentary link-fails are handled

   - eth: mlx5:
      - fix null-ptr-deref in add rule err flow
      - lock FTE when checking if active

   - eth: dwmac-mediatek: fix inverted handling of mediatek,mac-wol

  Previous releases - always broken:

   - sched: fix u32's systematic failure to free IDR entries for hnodes.

   - sctp: fix possible UAF in sctp_v6_available()

   - eth: bonding: add ns target multicast address to slave device

   - eth: mlx5: fix msix vectors to respect platform limit

   - eth: icssg-prueth: fix 1 PPS sync"

* tag 'net-6.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (38 commits)
  net: sched: u32: Add test case for systematic hnode IDR leaks
  selftests: bonding: add ns multicast group testing
  bonding: add ns target multicast address to slave device
  net: ti: icssg-prueth: Fix 1 PPS sync
  stmmac: dwmac-intel-plat: fix call balance of tx_clk handling routines
  net: Make copy_safe_from_sockptr() match documentation
  net: stmmac: dwmac-mediatek: Fix inverted handling of mediatek,mac-wol
  ipmr: Fix access to mfc_cache_list without lock held
  samples: pktgen: correct dev to DEV
  net: phylink: ensure PHY momentary link-fails are handled
  mptcp: pm: use _rcu variant under rcu_read_lock
  mptcp: hold pm lock when deleting entry
  mptcp: update local address flags when setting it
  net: sched: cls_u32: Fix u32's systematic failure to free IDR entries for hnodes.
  MAINTAINERS: Re-add cancelled Renesas driver sections
  Revert "igb: Disable threaded IRQ for igb_msix_other"
  Bluetooth: btintel: Direct exception event to bluetooth stack
  Bluetooth: hci_core: Fix calling mgmt_device_connected
  virtio/vsock: Improve MSG_ZEROCOPY error handling
  vsock: Fix sk_error_queue memory leak
  ...
parents 4abcd80f ca34aceb
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -225,6 +225,15 @@ The user must ensure the tokens are returned to the kernel in a timely manner.
Failure to do so will exhaust the limited dmabuf that is bound to the RX queue
and will lead to packet drops.

The user must pass no more than 128 tokens, with no more than 1024 total frags
among the token->token_count across all the tokens. If the user provides more
than 1024 frags, the kernel will free up to 1024 frags and return early.

The kernel returns the number of actual frags freed. The number of frags freed
can be less than the tokens provided by the user in case of:

(a) an internal kernel leak bug.
(b) the user passed more than 1024 frags.

Implementation & Caveats
========================
+30 −0
Original line number Diff line number Diff line
@@ -19579,6 +19579,17 @@ S: Supported
F:	Documentation/devicetree/bindings/i2c/renesas,iic-emev2.yaml
F:	drivers/i2c/busses/i2c-emev2.c
RENESAS ETHERNET AVB DRIVER
M:	Paul Barker <paul.barker.ct@bp.renesas.com>
M:	Niklas Söderlund <niklas.soderlund@ragnatech.se>
L:	netdev@vger.kernel.org
L:	linux-renesas-soc@vger.kernel.org
S:	Supported
F:	Documentation/devicetree/bindings/net/renesas,etheravb.yaml
F:	drivers/net/ethernet/renesas/Kconfig
F:	drivers/net/ethernet/renesas/Makefile
F:	drivers/net/ethernet/renesas/ravb*
RENESAS ETHERNET SWITCH DRIVER
R:	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
L:	netdev@vger.kernel.org
@@ -19628,6 +19639,14 @@ F: Documentation/devicetree/bindings/i2c/renesas,rmobile-iic.yaml
F:	drivers/i2c/busses/i2c-rcar.c
F:	drivers/i2c/busses/i2c-sh_mobile.c
RENESAS R-CAR SATA DRIVER
M:	Geert Uytterhoeven <geert+renesas@glider.be>
L:	linux-ide@vger.kernel.org
L:	linux-renesas-soc@vger.kernel.org
S:	Supported
F:	Documentation/devicetree/bindings/ata/renesas,rcar-sata.yaml
F:	drivers/ata/sata_rcar.c
RENESAS R-CAR THERMAL DRIVERS
M:	Niklas Söderlund <niklas.soderlund@ragnatech.se>
L:	linux-renesas-soc@vger.kernel.org
@@ -19703,6 +19722,17 @@ S: Supported
F:	Documentation/devicetree/bindings/i2c/renesas,rzv2m.yaml
F:	drivers/i2c/busses/i2c-rzv2m.c
RENESAS SUPERH ETHERNET DRIVER
M:	Niklas Söderlund <niklas.soderlund@ragnatech.se>
L:	netdev@vger.kernel.org
L:	linux-renesas-soc@vger.kernel.org
S:	Supported
F:	Documentation/devicetree/bindings/net/renesas,ether.yaml
F:	drivers/net/ethernet/renesas/Kconfig
F:	drivers/net/ethernet/renesas/Makefile
F:	drivers/net/ethernet/renesas/sh_eth*
F:	include/linux/sh_eth.h
RENESAS USB PHY DRIVER
M:	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
L:	linux-renesas-soc@vger.kernel.org
+2 −3
Original line number Diff line number Diff line
@@ -3288,13 +3288,12 @@ static int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb)
	case INTEL_TLV_TEST_EXCEPTION:
		/* Generate devcoredump from exception */
		if (!hci_devcd_init(hdev, skb->len)) {
			hci_devcd_append(hdev, skb);
			hci_devcd_append(hdev, skb_clone(skb, GFP_ATOMIC));
			hci_devcd_complete(hdev);
		} else {
			bt_dev_err(hdev, "Failed to generate devcoredump");
			kfree_skb(skb);
		}
		return 0;
	break;
	default:
		bt_dev_err(hdev, "Invalid exception type %02X", tlv->val[0]);
	}
+15 −1
Original line number Diff line number Diff line
@@ -1008,6 +1008,8 @@ static void bond_hw_addr_swap(struct bonding *bond, struct slave *new_active,

		if (bond->dev->flags & IFF_UP)
			bond_hw_addr_flush(bond->dev, old_active->dev);

		bond_slave_ns_maddrs_add(bond, old_active);
	}

	if (new_active) {
@@ -1024,6 +1026,8 @@ static void bond_hw_addr_swap(struct bonding *bond, struct slave *new_active,
			dev_mc_sync(new_active->dev, bond->dev);
			netif_addr_unlock_bh(bond->dev);
		}

		bond_slave_ns_maddrs_del(bond, new_active);
	}
}

@@ -2341,6 +2345,11 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
	bond_compute_features(bond);
	bond_set_carrier(bond);

	/* Needs to be called before bond_select_active_slave(), which will
	 * remove the maddrs if the slave is selected as active slave.
	 */
	bond_slave_ns_maddrs_add(bond, new_slave);

	if (bond_uses_primary(bond)) {
		block_netpoll_tx();
		bond_select_active_slave(bond);
@@ -2350,7 +2359,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
	if (bond_mode_can_use_xmit_hash(bond))
		bond_update_slave_arr(bond, NULL);


	if (!slave_dev->netdev_ops->ndo_bpf ||
	    !slave_dev->netdev_ops->ndo_xdp_xmit) {
		if (bond->xdp_prog) {
@@ -2548,6 +2556,12 @@ static int __bond_release_one(struct net_device *bond_dev,
	if (oldcurrent == slave)
		bond_change_active_slave(bond, NULL);

	/* Must be called after bond_change_active_slave () as the slave
	 * might change from an active slave to a backup slave. Then it is
	 * necessary to clear the maddrs on the backup slave.
	 */
	bond_slave_ns_maddrs_del(bond, slave);

	if (bond_is_lb(bond)) {
		/* Must be called only after the slave has been
		 * detached from the list and the curr_active_slave
+81 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#include <linux/sched/signal.h>

#include <net/bonding.h>
#include <net/ndisc.h>

static int bond_option_active_slave_set(struct bonding *bond,
					const struct bond_opt_value *newval);
@@ -1234,6 +1235,68 @@ static int bond_option_arp_ip_targets_set(struct bonding *bond,
}

#if IS_ENABLED(CONFIG_IPV6)
static bool slave_can_set_ns_maddr(const struct bonding *bond, struct slave *slave)
{
	return BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP &&
	       !bond_is_active_slave(slave) &&
	       slave->dev->flags & IFF_MULTICAST;
}

static void slave_set_ns_maddrs(struct bonding *bond, struct slave *slave, bool add)
{
	struct in6_addr *targets = bond->params.ns_targets;
	char slot_maddr[MAX_ADDR_LEN];
	int i;

	if (!slave_can_set_ns_maddr(bond, slave))
		return;

	for (i = 0; i < BOND_MAX_NS_TARGETS; i++) {
		if (ipv6_addr_any(&targets[i]))
			break;

		if (!ndisc_mc_map(&targets[i], slot_maddr, slave->dev, 0)) {
			if (add)
				dev_mc_add(slave->dev, slot_maddr);
			else
				dev_mc_del(slave->dev, slot_maddr);
		}
	}
}

void bond_slave_ns_maddrs_add(struct bonding *bond, struct slave *slave)
{
	if (!bond->params.arp_validate)
		return;
	slave_set_ns_maddrs(bond, slave, true);
}

void bond_slave_ns_maddrs_del(struct bonding *bond, struct slave *slave)
{
	if (!bond->params.arp_validate)
		return;
	slave_set_ns_maddrs(bond, slave, false);
}

static void slave_set_ns_maddr(struct bonding *bond, struct slave *slave,
			       struct in6_addr *target, struct in6_addr *slot)
{
	char target_maddr[MAX_ADDR_LEN], slot_maddr[MAX_ADDR_LEN];

	if (!bond->params.arp_validate || !slave_can_set_ns_maddr(bond, slave))
		return;

	/* remove the previous maddr from slave */
	if (!ipv6_addr_any(slot) &&
	    !ndisc_mc_map(slot, slot_maddr, slave->dev, 0))
		dev_mc_del(slave->dev, slot_maddr);

	/* add new maddr on slave if target is set */
	if (!ipv6_addr_any(target) &&
	    !ndisc_mc_map(target, target_maddr, slave->dev, 0))
		dev_mc_add(slave->dev, target_maddr);
}

static void _bond_options_ns_ip6_target_set(struct bonding *bond, int slot,
					    struct in6_addr *target,
					    unsigned long last_rx)
@@ -1243,8 +1306,10 @@ static void _bond_options_ns_ip6_target_set(struct bonding *bond, int slot,
	struct slave *slave;

	if (slot >= 0 && slot < BOND_MAX_NS_TARGETS) {
		bond_for_each_slave(bond, slave, iter)
		bond_for_each_slave(bond, slave, iter) {
			slave->target_last_arp_rx[slot] = last_rx;
			slave_set_ns_maddr(bond, slave, target, &targets[slot]);
		}
		targets[slot] = *target;
	}
}
@@ -1296,15 +1361,30 @@ static int bond_option_ns_ip6_targets_set(struct bonding *bond,
{
	return -EPERM;
}

static void slave_set_ns_maddrs(struct bonding *bond, struct slave *slave, bool add) {}

void bond_slave_ns_maddrs_add(struct bonding *bond, struct slave *slave) {}

void bond_slave_ns_maddrs_del(struct bonding *bond, struct slave *slave) {}
#endif

static int bond_option_arp_validate_set(struct bonding *bond,
					const struct bond_opt_value *newval)
{
	bool changed = !!bond->params.arp_validate != !!newval->value;
	struct list_head *iter;
	struct slave *slave;

	netdev_dbg(bond->dev, "Setting arp_validate to %s (%llu)\n",
		   newval->string, newval->value);
	bond->params.arp_validate = newval->value;

	if (changed) {
		bond_for_each_slave(bond, slave, iter)
			slave_set_ns_maddrs(bond, slave, !!bond->params.arp_validate);
	}

	return 0;
}

Loading