Skip to content

Commit cfaaa7d

Browse files
committed
Merge tag 'net-6.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
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 ...
2 parents 4abcd80 + ca34ace commit cfaaa7d

File tree

41 files changed

+543
-109
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+543
-109
lines changed

Documentation/networking/devmem.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,15 @@ The user must ensure the tokens are returned to the kernel in a timely manner.
225225
Failure to do so will exhaust the limited dmabuf that is bound to the RX queue
226226
and will lead to packet drops.
227227

228+
The user must pass no more than 128 tokens, with no more than 1024 total frags
229+
among the token->token_count across all the tokens. If the user provides more
230+
than 1024 frags, the kernel will free up to 1024 frags and return early.
231+
232+
The kernel returns the number of actual frags freed. The number of frags freed
233+
can be less than the tokens provided by the user in case of:
234+
235+
(a) an internal kernel leak bug.
236+
(b) the user passed more than 1024 frags.
228237

229238
Implementation & Caveats
230239
========================

MAINTAINERS

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19579,6 +19579,17 @@ S: Supported
1957919579
F: Documentation/devicetree/bindings/i2c/renesas,iic-emev2.yaml
1958019580
F: drivers/i2c/busses/i2c-emev2.c
1958119581

19582+
RENESAS ETHERNET AVB DRIVER
19583+
M: Paul Barker <[email protected]>
19584+
M: Niklas Söderlund <[email protected]>
19585+
19586+
19587+
S: Supported
19588+
F: Documentation/devicetree/bindings/net/renesas,etheravb.yaml
19589+
F: drivers/net/ethernet/renesas/Kconfig
19590+
F: drivers/net/ethernet/renesas/Makefile
19591+
F: drivers/net/ethernet/renesas/ravb*
19592+
1958219593
RENESAS ETHERNET SWITCH DRIVER
1958319594
R: Yoshihiro Shimoda <[email protected]>
1958419595
@@ -19628,6 +19639,14 @@ F: Documentation/devicetree/bindings/i2c/renesas,rmobile-iic.yaml
1962819639
F: drivers/i2c/busses/i2c-rcar.c
1962919640
F: drivers/i2c/busses/i2c-sh_mobile.c
1963019641

19642+
RENESAS R-CAR SATA DRIVER
19643+
M: Geert Uytterhoeven <[email protected]>
19644+
19645+
19646+
S: Supported
19647+
F: Documentation/devicetree/bindings/ata/renesas,rcar-sata.yaml
19648+
F: drivers/ata/sata_rcar.c
19649+
1963119650
RENESAS R-CAR THERMAL DRIVERS
1963219651
M: Niklas Söderlund <[email protected]>
1963319652
@@ -19703,6 +19722,17 @@ S: Supported
1970319722
F: Documentation/devicetree/bindings/i2c/renesas,rzv2m.yaml
1970419723
F: drivers/i2c/busses/i2c-rzv2m.c
1970519724

19725+
RENESAS SUPERH ETHERNET DRIVER
19726+
M: Niklas Söderlund <[email protected]>
19727+
19728+
19729+
S: Supported
19730+
F: Documentation/devicetree/bindings/net/renesas,ether.yaml
19731+
F: drivers/net/ethernet/renesas/Kconfig
19732+
F: drivers/net/ethernet/renesas/Makefile
19733+
F: drivers/net/ethernet/renesas/sh_eth*
19734+
F: include/linux/sh_eth.h
19735+
1970619736
RENESAS USB PHY DRIVER
1970719737
M: Yoshihiro Shimoda <[email protected]>
1970819738

drivers/bluetooth/btintel.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3288,13 +3288,12 @@ static int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb)
32883288
case INTEL_TLV_TEST_EXCEPTION:
32893289
/* Generate devcoredump from exception */
32903290
if (!hci_devcd_init(hdev, skb->len)) {
3291-
hci_devcd_append(hdev, skb);
3291+
hci_devcd_append(hdev, skb_clone(skb, GFP_ATOMIC));
32923292
hci_devcd_complete(hdev);
32933293
} else {
32943294
bt_dev_err(hdev, "Failed to generate devcoredump");
3295-
kfree_skb(skb);
32963295
}
3297-
return 0;
3296+
break;
32983297
default:
32993298
bt_dev_err(hdev, "Invalid exception type %02X", tlv->val[0]);
33003299
}

drivers/net/bonding/bond_main.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,6 +1008,8 @@ static void bond_hw_addr_swap(struct bonding *bond, struct slave *new_active,
10081008

10091009
if (bond->dev->flags & IFF_UP)
10101010
bond_hw_addr_flush(bond->dev, old_active->dev);
1011+
1012+
bond_slave_ns_maddrs_add(bond, old_active);
10111013
}
10121014

10131015
if (new_active) {
@@ -1024,6 +1026,8 @@ static void bond_hw_addr_swap(struct bonding *bond, struct slave *new_active,
10241026
dev_mc_sync(new_active->dev, bond->dev);
10251027
netif_addr_unlock_bh(bond->dev);
10261028
}
1029+
1030+
bond_slave_ns_maddrs_del(bond, new_active);
10271031
}
10281032
}
10291033

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

2348+
/* Needs to be called before bond_select_active_slave(), which will
2349+
* remove the maddrs if the slave is selected as active slave.
2350+
*/
2351+
bond_slave_ns_maddrs_add(bond, new_slave);
2352+
23442353
if (bond_uses_primary(bond)) {
23452354
block_netpoll_tx();
23462355
bond_select_active_slave(bond);
@@ -2350,7 +2359,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
23502359
if (bond_mode_can_use_xmit_hash(bond))
23512360
bond_update_slave_arr(bond, NULL);
23522361

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

2559+
/* Must be called after bond_change_active_slave () as the slave
2560+
* might change from an active slave to a backup slave. Then it is
2561+
* necessary to clear the maddrs on the backup slave.
2562+
*/
2563+
bond_slave_ns_maddrs_del(bond, slave);
2564+
25512565
if (bond_is_lb(bond)) {
25522566
/* Must be called only after the slave has been
25532567
* detached from the list and the curr_active_slave

drivers/net/bonding/bond_options.c

Lines changed: 81 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/sched/signal.h>
1616

1717
#include <net/bonding.h>
18+
#include <net/ndisc.h>
1819

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

12361237
#if IS_ENABLED(CONFIG_IPV6)
1238+
static bool slave_can_set_ns_maddr(const struct bonding *bond, struct slave *slave)
1239+
{
1240+
return BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP &&
1241+
!bond_is_active_slave(slave) &&
1242+
slave->dev->flags & IFF_MULTICAST;
1243+
}
1244+
1245+
static void slave_set_ns_maddrs(struct bonding *bond, struct slave *slave, bool add)
1246+
{
1247+
struct in6_addr *targets = bond->params.ns_targets;
1248+
char slot_maddr[MAX_ADDR_LEN];
1249+
int i;
1250+
1251+
if (!slave_can_set_ns_maddr(bond, slave))
1252+
return;
1253+
1254+
for (i = 0; i < BOND_MAX_NS_TARGETS; i++) {
1255+
if (ipv6_addr_any(&targets[i]))
1256+
break;
1257+
1258+
if (!ndisc_mc_map(&targets[i], slot_maddr, slave->dev, 0)) {
1259+
if (add)
1260+
dev_mc_add(slave->dev, slot_maddr);
1261+
else
1262+
dev_mc_del(slave->dev, slot_maddr);
1263+
}
1264+
}
1265+
}
1266+
1267+
void bond_slave_ns_maddrs_add(struct bonding *bond, struct slave *slave)
1268+
{
1269+
if (!bond->params.arp_validate)
1270+
return;
1271+
slave_set_ns_maddrs(bond, slave, true);
1272+
}
1273+
1274+
void bond_slave_ns_maddrs_del(struct bonding *bond, struct slave *slave)
1275+
{
1276+
if (!bond->params.arp_validate)
1277+
return;
1278+
slave_set_ns_maddrs(bond, slave, false);
1279+
}
1280+
1281+
static void slave_set_ns_maddr(struct bonding *bond, struct slave *slave,
1282+
struct in6_addr *target, struct in6_addr *slot)
1283+
{
1284+
char target_maddr[MAX_ADDR_LEN], slot_maddr[MAX_ADDR_LEN];
1285+
1286+
if (!bond->params.arp_validate || !slave_can_set_ns_maddr(bond, slave))
1287+
return;
1288+
1289+
/* remove the previous maddr from slave */
1290+
if (!ipv6_addr_any(slot) &&
1291+
!ndisc_mc_map(slot, slot_maddr, slave->dev, 0))
1292+
dev_mc_del(slave->dev, slot_maddr);
1293+
1294+
/* add new maddr on slave if target is set */
1295+
if (!ipv6_addr_any(target) &&
1296+
!ndisc_mc_map(target, target_maddr, slave->dev, 0))
1297+
dev_mc_add(slave->dev, target_maddr);
1298+
}
1299+
12371300
static void _bond_options_ns_ip6_target_set(struct bonding *bond, int slot,
12381301
struct in6_addr *target,
12391302
unsigned long last_rx)
@@ -1243,8 +1306,10 @@ static void _bond_options_ns_ip6_target_set(struct bonding *bond, int slot,
12431306
struct slave *slave;
12441307

12451308
if (slot >= 0 && slot < BOND_MAX_NS_TARGETS) {
1246-
bond_for_each_slave(bond, slave, iter)
1309+
bond_for_each_slave(bond, slave, iter) {
12471310
slave->target_last_arp_rx[slot] = last_rx;
1311+
slave_set_ns_maddr(bond, slave, target, &targets[slot]);
1312+
}
12481313
targets[slot] = *target;
12491314
}
12501315
}
@@ -1296,15 +1361,30 @@ static int bond_option_ns_ip6_targets_set(struct bonding *bond,
12961361
{
12971362
return -EPERM;
12981363
}
1364+
1365+
static void slave_set_ns_maddrs(struct bonding *bond, struct slave *slave, bool add) {}
1366+
1367+
void bond_slave_ns_maddrs_add(struct bonding *bond, struct slave *slave) {}
1368+
1369+
void bond_slave_ns_maddrs_del(struct bonding *bond, struct slave *slave) {}
12991370
#endif
13001371

13011372
static int bond_option_arp_validate_set(struct bonding *bond,
13021373
const struct bond_opt_value *newval)
13031374
{
1375+
bool changed = !!bond->params.arp_validate != !!newval->value;
1376+
struct list_head *iter;
1377+
struct slave *slave;
1378+
13041379
netdev_dbg(bond->dev, "Setting arp_validate to %s (%llu)\n",
13051380
newval->string, newval->value);
13061381
bond->params.arp_validate = newval->value;
13071382

1383+
if (changed) {
1384+
bond_for_each_slave(bond, slave, iter)
1385+
slave_set_ns_maddrs(bond, slave, !!bond->params.arp_validate);
1386+
}
1387+
13081388
return 0;
13091389
}
13101390

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ static int igb_request_msix(struct igb_adapter *adapter)
907907
int i, err = 0, vector = 0, free_vector = 0;
908908

909909
err = request_irq(adapter->msix_entries[vector].vector,
910-
igb_msix_other, IRQF_NO_THREAD, netdev->name, adapter);
910+
igb_msix_other, 0, netdev->name, adapter);
911911
if (err)
912912
goto err_out;
913913

drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ mlx5_tc_ct_entry_add_rule(struct mlx5_tc_ct_priv *ct_priv,
866866
return 0;
867867

868868
err_rule:
869-
mlx5_tc_ct_entry_destroy_mod_hdr(ct_priv, zone_rule->attr, zone_rule->mh);
869+
mlx5_tc_ct_entry_destroy_mod_hdr(ct_priv, attr, zone_rule->mh);
870870
mlx5_put_label_mapping(ct_priv, attr->ct_attr.ct_labels_id);
871871
err_mod_hdr:
872872
kfree(attr);

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ tx_sync_info_get(struct mlx5e_ktls_offload_context_tx *priv_tx,
660660
while (remaining > 0) {
661661
skb_frag_t *frag = &record->frags[i];
662662

663-
get_page(skb_frag_page(frag));
663+
page_ref_inc(skb_frag_page(frag));
664664
remaining -= skb_frag_size(frag);
665665
info->frags[i++] = *frag;
666666
}
@@ -763,7 +763,7 @@ void mlx5e_ktls_tx_handle_resync_dump_comp(struct mlx5e_txqsq *sq,
763763
stats = sq->stats;
764764

765765
mlx5e_tx_dma_unmap(sq->pdev, dma);
766-
put_page(wi->resync_dump_frag_page);
766+
page_ref_dec(wi->resync_dump_frag_page);
767767
stats->tls_dump_packets++;
768768
stats->tls_dump_bytes += wi->num_bytes;
769769
}
@@ -816,12 +816,12 @@ mlx5e_ktls_tx_handle_ooo(struct mlx5e_ktls_offload_context_tx *priv_tx,
816816

817817
err_out:
818818
for (; i < info.nr_frags; i++)
819-
/* The put_page() here undoes the page ref obtained in tx_sync_info_get().
819+
/* The page_ref_dec() here undoes the page ref obtained in tx_sync_info_get().
820820
* Page refs obtained for the DUMP WQEs above (by page_ref_add) will be
821821
* released only upon their completions (or in mlx5e_free_txqsq_descs,
822822
* if channel closes).
823823
*/
824-
put_page(skb_frag_page(&info.frags[i]));
824+
page_ref_dec(skb_frag_page(&info.frags[i]));
825825

826826
return MLX5E_KTLS_SYNC_FAIL;
827827
}

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4267,7 +4267,8 @@ void mlx5e_set_xdp_feature(struct net_device *netdev)
42674267
struct mlx5e_params *params = &priv->channels.params;
42684268
xdp_features_t val;
42694269

4270-
if (params->packet_merge.type != MLX5E_PACKET_MERGE_NONE) {
4270+
if (!netdev->netdev_ops->ndo_bpf ||
4271+
params->packet_merge.type != MLX5E_PACKET_MERGE_NONE) {
42714272
xdp_clear_features_flag(netdev);
42724273
return;
42734274
}

drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "en.h"
3737
#include "en/port.h"
3838
#include "eswitch.h"
39+
#include "lib/mlx5.h"
3940

4041
static int mlx5e_test_health_info(struct mlx5e_priv *priv)
4142
{
@@ -247,6 +248,9 @@ static int mlx5e_cond_loopback(struct mlx5e_priv *priv)
247248
if (is_mdev_switchdev_mode(priv->mdev))
248249
return -EOPNOTSUPP;
249250

251+
if (mlx5_get_sd(priv->mdev))
252+
return -EOPNOTSUPP;
253+
250254
return 0;
251255
}
252256

0 commit comments

Comments
 (0)