Skip to content

Commit 1cac389

Browse files
committed
Merge tag 'net-6.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Including fixes from bluetooth, CAN and wireless. There are no known regressions currently under investigation. Current release - fix to a fix: - can: gs_usb_receive_bulk_callback(): fix error message Current release - regressions: - eth: gve: fix probe failure if clock read fails Previous releases - regressions: - ipv6: use the right ifindex when replying to icmpv6 from localhost - mptcp: fix race in mptcp_pm_nl_flush_addrs_doit() - bluetooth: fix null-ptr-deref in hci_uart_write_work - eth: - sfc: fix deadlock in RSS config read - ice: ifix NULL pointer dereference in ice_vsi_set_napi_queues - mlx5: fix memory leak in esw_acl_ingress_lgcy_setup() Previous releases - always broken: - core: fix segmentation of forwarding fraglist GRO - wifi: mac80211: correctly decode TTLM with default link map - mptcp: avoid dup SUB_CLOSED events after disconnect - nfc: fix memleak in nfc_llcp_send_ui_frame(). - eth: - bonding: fix use-after-free due to enslave fail - mlx5e: - TC, delete flows only for existing peers - fix inverted cap check in tx flow table root disconnect" * tag 'net-6.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (43 commits) net: fix segmentation of forwarding fraglist GRO wifi: mac80211: correctly decode TTLM with default link map selftests: mptcp: join: fix local endp not being tracked selftests: mptcp: check subflow errors in close events mptcp: only reset subflow errors when propagated selftests: mptcp: check no dup close events after error mptcp: avoid dup SUB_CLOSED events after disconnect net/mlx5e: Skip ESN replay window setup for IPsec crypto offload net/mlx5: Fix vhca_id access call trace use before alloc net/mlx5: fs, Fix inverted cap check in tx flow table root disconnect net: phy: micrel: fix clk warning when removing the driver net/mlx5e: don't assume psp tx skbs are ipv6 csum handling net: bridge: fix static key check nfc: nci: Fix race between rfkill and nci_unregister_device(). gve: fix probe failure if clock read fails net/mlx5e: Account for netdev stats in ndo_get_stats64 net/mlx5e: TC, delete flows only for existing peers net/mlx5: Fix Unbinding uplink-netdev in switchdev mode ice: stop counting UDP csum mismatch as rx_errors ice: Fix NULL pointer dereference in ice_vsi_set_napi_queues ...
2 parents e829083 + 426ca15 commit 1cac389

54 files changed

Lines changed: 402 additions & 163 deletions

Some content is hidden

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

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9260,7 +9260,6 @@ F: drivers/scsi/be2iscsi/
92609260
EMULEX 10Gbps NIC BE2, BE3-R, Lancer, Skyhawk-R DRIVER (be2net)
92619261
M: Ajit Khaparde <ajit.khaparde@broadcom.com>
92629262
M: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
9263-
M: Somnath Kotur <somnath.kotur@broadcom.com>
92649263
L: netdev@vger.kernel.org
92659264
S: Maintained
92669265
W: http://www.emulex.com

drivers/bluetooth/hci_ldisc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,8 @@ static int hci_uart_register_dev(struct hci_uart *hu)
685685
return err;
686686
}
687687

688+
set_bit(HCI_UART_PROTO_INIT, &hu->flags);
689+
688690
if (test_bit(HCI_UART_INIT_PENDING, &hu->hdev_flags))
689691
return 0;
690692

@@ -712,8 +714,6 @@ static int hci_uart_set_proto(struct hci_uart *hu, int id)
712714

713715
hu->proto = p;
714716

715-
set_bit(HCI_UART_PROTO_INIT, &hu->flags);
716-
717717
err = hci_uart_register_dev(hu);
718718
if (err) {
719719
return err;

drivers/net/bonding/bond_main.c

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,11 +2202,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
22022202
unblock_netpoll_tx();
22032203
}
22042204

2205-
/* broadcast mode uses the all_slaves to loop through slaves. */
2206-
if (bond_mode_can_use_xmit_hash(bond) ||
2207-
BOND_MODE(bond) == BOND_MODE_BROADCAST)
2208-
bond_update_slave_arr(bond, NULL);
2209-
22102205
if (!slave_dev->netdev_ops->ndo_bpf ||
22112206
!slave_dev->netdev_ops->ndo_xdp_xmit) {
22122207
if (bond->xdp_prog) {
@@ -2240,6 +2235,11 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
22402235
bpf_prog_inc(bond->xdp_prog);
22412236
}
22422237

2238+
/* broadcast mode uses the all_slaves to loop through slaves. */
2239+
if (bond_mode_can_use_xmit_hash(bond) ||
2240+
BOND_MODE(bond) == BOND_MODE_BROADCAST)
2241+
bond_update_slave_arr(bond, NULL);
2242+
22432243
bond_xdp_set_features(bond_dev);
22442244

22452245
slave_info(bond_dev, slave_dev, "Enslaving as %s interface with %s link\n",
@@ -3047,8 +3047,8 @@ static void bond_validate_arp(struct bonding *bond, struct slave *slave, __be32
30473047
__func__, &sip);
30483048
return;
30493049
}
3050-
slave->last_rx = jiffies;
3051-
slave->target_last_arp_rx[i] = jiffies;
3050+
WRITE_ONCE(slave->last_rx, jiffies);
3051+
WRITE_ONCE(slave->target_last_arp_rx[i], jiffies);
30523052
}
30533053

30543054
static int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond,
@@ -3267,8 +3267,8 @@ static void bond_validate_na(struct bonding *bond, struct slave *slave,
32673267
__func__, saddr);
32683268
return;
32693269
}
3270-
slave->last_rx = jiffies;
3271-
slave->target_last_arp_rx[i] = jiffies;
3270+
WRITE_ONCE(slave->last_rx, jiffies);
3271+
WRITE_ONCE(slave->target_last_arp_rx[i], jiffies);
32723272
}
32733273

32743274
static int bond_na_rcv(const struct sk_buff *skb, struct bonding *bond,
@@ -3338,7 +3338,7 @@ int bond_rcv_validate(const struct sk_buff *skb, struct bonding *bond,
33383338
(slave_do_arp_validate_only(bond) && is_ipv6) ||
33393339
#endif
33403340
!slave_do_arp_validate_only(bond))
3341-
slave->last_rx = jiffies;
3341+
WRITE_ONCE(slave->last_rx, jiffies);
33423342
return RX_HANDLER_ANOTHER;
33433343
} else if (is_arp) {
33443344
return bond_arp_rcv(skb, bond, slave);
@@ -3406,7 +3406,7 @@ static void bond_loadbalance_arp_mon(struct bonding *bond)
34063406

34073407
if (slave->link != BOND_LINK_UP) {
34083408
if (bond_time_in_interval(bond, last_tx, 1) &&
3409-
bond_time_in_interval(bond, slave->last_rx, 1)) {
3409+
bond_time_in_interval(bond, READ_ONCE(slave->last_rx), 1)) {
34103410

34113411
bond_propose_link_state(slave, BOND_LINK_UP);
34123412
slave_state_changed = 1;
@@ -3430,8 +3430,10 @@ static void bond_loadbalance_arp_mon(struct bonding *bond)
34303430
* when the source ip is 0, so don't take the link down
34313431
* if we don't know our ip yet
34323432
*/
3433-
if (!bond_time_in_interval(bond, last_tx, bond->params.missed_max) ||
3434-
!bond_time_in_interval(bond, slave->last_rx, bond->params.missed_max)) {
3433+
if (!bond_time_in_interval(bond, last_tx,
3434+
bond->params.missed_max) ||
3435+
!bond_time_in_interval(bond, READ_ONCE(slave->last_rx),
3436+
bond->params.missed_max)) {
34353437

34363438
bond_propose_link_state(slave, BOND_LINK_DOWN);
34373439
slave_state_changed = 1;

drivers/net/bonding/bond_options.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@ static void _bond_options_arp_ip_target_set(struct bonding *bond, int slot,
11521152

11531153
if (slot >= 0 && slot < BOND_MAX_ARP_TARGETS) {
11541154
bond_for_each_slave(bond, slave, iter)
1155-
slave->target_last_arp_rx[slot] = last_rx;
1155+
WRITE_ONCE(slave->target_last_arp_rx[slot], last_rx);
11561156
targets[slot] = target;
11571157
}
11581158
}
@@ -1221,8 +1221,8 @@ static int bond_option_arp_ip_target_rem(struct bonding *bond, __be32 target)
12211221
bond_for_each_slave(bond, slave, iter) {
12221222
targets_rx = slave->target_last_arp_rx;
12231223
for (i = ind; (i < BOND_MAX_ARP_TARGETS-1) && targets[i+1]; i++)
1224-
targets_rx[i] = targets_rx[i+1];
1225-
targets_rx[i] = 0;
1224+
WRITE_ONCE(targets_rx[i], READ_ONCE(targets_rx[i+1]));
1225+
WRITE_ONCE(targets_rx[i], 0);
12261226
}
12271227
for (i = ind; (i < BOND_MAX_ARP_TARGETS-1) && targets[i+1]; i++)
12281228
targets[i] = targets[i+1];
@@ -1377,7 +1377,7 @@ static void _bond_options_ns_ip6_target_set(struct bonding *bond, int slot,
13771377

13781378
if (slot >= 0 && slot < BOND_MAX_NS_TARGETS) {
13791379
bond_for_each_slave(bond, slave, iter) {
1380-
slave->target_last_arp_rx[slot] = last_rx;
1380+
WRITE_ONCE(slave->target_last_arp_rx[slot], last_rx);
13811381
slave_set_ns_maddr(bond, slave, target, &targets[slot]);
13821382
}
13831383
targets[slot] = *target;

drivers/net/can/at91_can.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ static int at91_can_probe(struct platform_device *pdev)
10991099
if (IS_ERR(transceiver)) {
11001100
err = PTR_ERR(transceiver);
11011101
dev_err_probe(&pdev->dev, err, "failed to get phy\n");
1102-
goto exit_iounmap;
1102+
goto exit_free;
11031103
}
11041104

11051105
dev->netdev_ops = &at91_netdev_ops;

drivers/net/can/usb/gs_usb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ static void gs_usb_receive_bulk_callback(struct urb *urb)
610610
{
611611
struct gs_usb *parent = urb->context;
612612
struct gs_can *dev;
613-
struct net_device *netdev;
613+
struct net_device *netdev = NULL;
614614
int rc;
615615
struct net_device_stats *stats;
616616
struct gs_host_frame *hf = urb->transfer_buffer;
@@ -768,7 +768,7 @@ static void gs_usb_receive_bulk_callback(struct urb *urb)
768768
}
769769
} else if (rc != -ESHUTDOWN && net_ratelimit()) {
770770
netdev_info(netdev, "failed to re-submit IN URB: %pe\n",
771-
ERR_PTR(urb->status));
771+
ERR_PTR(rc));
772772
}
773773
}
774774

drivers/net/dsa/yt921x.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -682,21 +682,22 @@ static int yt921x_read_mib(struct yt921x_priv *priv, int port)
682682
const struct yt921x_mib_desc *desc = &yt921x_mib_descs[i];
683683
u32 reg = YT921X_MIBn_DATA0(port) + desc->offset;
684684
u64 *valp = &((u64 *)mib)[i];
685-
u64 val = *valp;
686685
u32 val0;
687-
u32 val1;
686+
u64 val;
688687

689688
res = yt921x_reg_read(priv, reg, &val0);
690689
if (res)
691690
break;
692691

693692
if (desc->size <= 1) {
694-
if (val < (u32)val)
695-
/* overflow */
696-
val += (u64)U32_MAX + 1;
697-
val &= ~U32_MAX;
698-
val |= val0;
693+
u64 old_val = *valp;
694+
695+
val = (old_val & ~(u64)U32_MAX) | val0;
696+
if (val < old_val)
697+
val += 1ull << 32;
699698
} else {
699+
u32 val1;
700+
700701
res = yt921x_reg_read(priv, reg + 4, &val1);
701702
if (res)
702703
break;

drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@ struct bcmasp_intf *bcmasp_interface_create(struct bcmasp_priv *priv,
12611261
netdev_err(intf->ndev, "invalid PHY mode: %s for port %d\n",
12621262
phy_modes(intf->phy_interface), intf->port);
12631263
ret = -EINVAL;
1264-
goto err_free_netdev;
1264+
goto err_deregister_fixed_link;
12651265
}
12661266

12671267
ret = of_get_ethdev_address(ndev_dn, ndev);
@@ -1286,6 +1286,9 @@ struct bcmasp_intf *bcmasp_interface_create(struct bcmasp_priv *priv,
12861286

12871287
return intf;
12881288

1289+
err_deregister_fixed_link:
1290+
if (of_phy_is_fixed_link(ndev_dn))
1291+
of_phy_deregister_fixed_link(ndev_dn);
12891292
err_free_netdev:
12901293
free_netdev(ndev);
12911294
err:

drivers/net/ethernet/google/gve/gve.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,6 +1206,11 @@ static inline bool gve_supports_xdp_xmit(struct gve_priv *priv)
12061206
}
12071207
}
12081208

1209+
static inline bool gve_is_clock_enabled(struct gve_priv *priv)
1210+
{
1211+
return priv->nic_ts_report;
1212+
}
1213+
12091214
/* gqi napi handler defined in gve_main.c */
12101215
int gve_napi_poll(struct napi_struct *napi, int budget);
12111216

drivers/net/ethernet/google/gve/gve_ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ static int gve_get_ts_info(struct net_device *netdev,
938938

939939
ethtool_op_get_ts_info(netdev, info);
940940

941-
if (priv->nic_timestamp_supported) {
941+
if (gve_is_clock_enabled(priv)) {
942942
info->so_timestamping |= SOF_TIMESTAMPING_RX_HARDWARE |
943943
SOF_TIMESTAMPING_RAW_HARDWARE;
944944

0 commit comments

Comments
 (0)