Skip to content

Commit 504c25c

Browse files
committed
Merge tag 'net-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from wifi, netfilter and can. A handful of awaited fixes here - revert of the FEC changes, bluetooth fix, fixes for iwlwifi spew. We added a warning in PHY/MDIO code which is triggering on a couple of platforms in a false-positive-ish way. If we can't iron that out over the week we'll drop it and re-add for 6.1. I've added a new "follow up fixes" section for fixes to fixes in 6.0-rcs but it may actually give the false impression that those are problematic or that more testing time would have caught them. So likely a one time thing. Follow up fixes: - nf_tables_addchain: fix nft_counters_enabled underflow - ebtables: fix memory leak when blob is malformed - nf_ct_ftp: fix deadlock when nat rewrite is needed Current release - regressions: - Revert "fec: Restart PPS after link state change" and the related "net: fec: Use a spinlock to guard `fep->ptp_clk_on`" - Bluetooth: fix HCIGETDEVINFO regression - wifi: mt76: fix 5 GHz connection regression on mt76x0/mt76x2 - mptcp: fix fwd memory accounting on coalesce - rwlock removal fall out: - ipmr: always call ip{,6}_mr_forward() from RCU read-side critical section - ipv6: fix crash when IPv6 is administratively disabled - tcp: read multiple skbs in tcp_read_skb() - mdio_bus_phy_resume state warning fallout: - eth: ravb: fix PHY state warning splat during system resume - eth: sh_eth: fix PHY state warning splat during system resume Current release - new code bugs: - wifi: iwlwifi: don't spam logs with NSS>2 messages - eth: mtk_eth_soc: enable XDP support just for MT7986 SoC Previous releases - regressions: - bonding: fix NULL deref in bond_rr_gen_slave_id - wifi: iwlwifi: mark IWLMEI as broken Previous releases - always broken: - nf_conntrack helpers: - irc: tighten matching on DCC message - sip: fix ct_sip_walk_headers - osf: fix possible bogus match in nf_osf_find() - ipvlan: fix out-of-bound bugs caused by unset skb->mac_header - core: fix flow symmetric hash - bonding, team: unsync device addresses on ndo_stop - phy: micrel: fix shared interrupt on LAN8814" * tag 'net-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (83 commits) selftests: forwarding: add shebang for sch_red.sh bnxt: prevent skb UAF after handing over to PTP worker net: marvell: Fix refcounting bugs in prestera_port_sfp_bind() net: sched: fix possible refcount leak in tc_new_tfilter() net: sunhme: Fix packet reception for len < RX_COPY_THRESHOLD udp: Use WARN_ON_ONCE() in udp_read_skb() selftests: bonding: cause oops in bond_rr_gen_slave_id bonding: fix NULL deref in bond_rr_gen_slave_id net: phy: micrel: fix shared interrupt on LAN8814 net/smc: Stop the CLC flow if no link to map buffers on ice: Fix ice_xdp_xmit() when XDP TX queue number is not sufficient net: atlantic: fix potential memory leak in aq_ndev_close() can: gs_usb: gs_usb_set_phys_id(): return with error if identify is not supported can: gs_usb: gs_can_open(): fix race dev->can.state condition can: flexcan: flexcan_mailbox_read() fix return value for drop = true net: sh_eth: Fix PHY state warning splat during system resume net: ravb: Fix PHY state warning splat during system resume netfilter: nf_ct_ftp: fix deadlock when nat rewrite is needed netfilter: ebtables: fix memory leak when blob is malformed netfilter: nf_tables: fix percpu memory leak at nf_tables_addchain() ...
2 parents 129e715 + 83e4b19 commit 504c25c

File tree

94 files changed

+1057
-432
lines changed

Some content is hidden

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

94 files changed

+1057
-432
lines changed

Documentation/networking/mptcp-sysctl.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ allow_join_initial_addr_port - BOOLEAN
4747
Default: 1
4848

4949
pm_type - INTEGER
50-
5150
Set the default path manager type to use for each new MPTCP
5251
socket. In-kernel path management will control subflow
5352
connections and address advertisements according to

Documentation/networking/nf_conntrack-sysctl.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,6 @@ nf_conntrack_generic_timeout - INTEGER (seconds)
7070
Default for generic timeout. This refers to layer 4 unknown/unsupported
7171
protocols.
7272

73-
nf_conntrack_helper - BOOLEAN
74-
- 0 - disabled (default)
75-
- not 0 - enabled
76-
77-
Enable automatic conntrack helper assignment.
78-
If disabled it is required to set up iptables rules to assign
79-
helpers to connections. See the CT target description in the
80-
iptables-extensions(8) man page for further information.
81-
8273
nf_conntrack_icmp_timeout - INTEGER (seconds)
8374
default 30
8475

MAINTAINERS

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8652,8 +8652,8 @@ F: drivers/input/touchscreen/goodix*
86528652

86538653
GOOGLE ETHERNET DRIVERS
86548654
M: Jeroen de Borst <[email protected]>
8655-
R: Catherine Sullivan <[email protected]>
8656-
R: David Awogbemila <awogbemila@google.com>
8655+
M: Catherine Sullivan <[email protected]>
8656+
R: Shailend Chand <shailend@google.com>
86578657
86588658
S: Supported
86598659
F: Documentation/networking/device_drivers/ethernet/google/gve.rst
@@ -16857,6 +16857,7 @@ F: drivers/net/ethernet/qualcomm/emac/
1685716857

1685816858
QUALCOMM ETHQOS ETHERNET DRIVER
1685916859
M: Vinod Koul <[email protected]>
16860+
R: Bhupesh Sharma <[email protected]>
1686016861
1686116862
S: Maintained
1686216863
F: Documentation/devicetree/bindings/net/qcom,ethqos.txt
@@ -19959,6 +19960,7 @@ S: Supported
1995919960
F: drivers/net/team/
1996019961
F: include/linux/if_team.h
1996119962
F: include/uapi/linux/if_team.h
19963+
F: tools/testing/selftests/net/team/
1996219964

1996319965
TECHNOLOGIC SYSTEMS TS-5500 PLATFORM SUPPORT
1996419966
M: "Savoir-faire Linux Inc." <[email protected]>

drivers/net/bonding/bond_3ad.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ static const u8 null_mac_addr[ETH_ALEN + 2] __long_aligned = {
8888
static const u16 ad_ticks_per_sec = 1000 / AD_TIMER_INTERVAL;
8989
static const int ad_delta_in_ticks = (AD_TIMER_INTERVAL * HZ) / 1000;
9090

91-
static const u8 lacpdu_mcast_addr[ETH_ALEN + 2] __long_aligned =
92-
MULTICAST_LACPDU_ADDR;
91+
const u8 lacpdu_mcast_addr[ETH_ALEN + 2] __long_aligned = {
92+
0x01, 0x80, 0xC2, 0x00, 0x00, 0x02
93+
};
9394

9495
/* ================= main 802.3ad protocol functions ================== */
9596
static int ad_lacpdu_send(struct port *port);

drivers/net/bonding/bond_main.c

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -865,12 +865,8 @@ static void bond_hw_addr_flush(struct net_device *bond_dev,
865865
dev_uc_unsync(slave_dev, bond_dev);
866866
dev_mc_unsync(slave_dev, bond_dev);
867867

868-
if (BOND_MODE(bond) == BOND_MODE_8023AD) {
869-
/* del lacpdu mc addr from mc list */
870-
u8 lacpdu_multicast[ETH_ALEN] = MULTICAST_LACPDU_ADDR;
871-
872-
dev_mc_del(slave_dev, lacpdu_multicast);
873-
}
868+
if (BOND_MODE(bond) == BOND_MODE_8023AD)
869+
dev_mc_del(slave_dev, lacpdu_mcast_addr);
874870
}
875871

876872
/*--------------------------- Active slave change ---------------------------*/
@@ -890,7 +886,8 @@ static void bond_hw_addr_swap(struct bonding *bond, struct slave *new_active,
890886
if (bond->dev->flags & IFF_ALLMULTI)
891887
dev_set_allmulti(old_active->dev, -1);
892888

893-
bond_hw_addr_flush(bond->dev, old_active->dev);
889+
if (bond->dev->flags & IFF_UP)
890+
bond_hw_addr_flush(bond->dev, old_active->dev);
894891
}
895892

896893
if (new_active) {
@@ -901,10 +898,12 @@ static void bond_hw_addr_swap(struct bonding *bond, struct slave *new_active,
901898
if (bond->dev->flags & IFF_ALLMULTI)
902899
dev_set_allmulti(new_active->dev, 1);
903900

904-
netif_addr_lock_bh(bond->dev);
905-
dev_uc_sync(new_active->dev, bond->dev);
906-
dev_mc_sync(new_active->dev, bond->dev);
907-
netif_addr_unlock_bh(bond->dev);
901+
if (bond->dev->flags & IFF_UP) {
902+
netif_addr_lock_bh(bond->dev);
903+
dev_uc_sync(new_active->dev, bond->dev);
904+
dev_mc_sync(new_active->dev, bond->dev);
905+
netif_addr_unlock_bh(bond->dev);
906+
}
908907
}
909908
}
910909

@@ -2166,16 +2165,14 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
21662165
}
21672166
}
21682167

2169-
netif_addr_lock_bh(bond_dev);
2170-
dev_mc_sync_multiple(slave_dev, bond_dev);
2171-
dev_uc_sync_multiple(slave_dev, bond_dev);
2172-
netif_addr_unlock_bh(bond_dev);
2173-
2174-
if (BOND_MODE(bond) == BOND_MODE_8023AD) {
2175-
/* add lacpdu mc addr to mc list */
2176-
u8 lacpdu_multicast[ETH_ALEN] = MULTICAST_LACPDU_ADDR;
2168+
if (bond_dev->flags & IFF_UP) {
2169+
netif_addr_lock_bh(bond_dev);
2170+
dev_mc_sync_multiple(slave_dev, bond_dev);
2171+
dev_uc_sync_multiple(slave_dev, bond_dev);
2172+
netif_addr_unlock_bh(bond_dev);
21772173

2178-
dev_mc_add(slave_dev, lacpdu_multicast);
2174+
if (BOND_MODE(bond) == BOND_MODE_8023AD)
2175+
dev_mc_add(slave_dev, lacpdu_mcast_addr);
21792176
}
21802177
}
21812178

@@ -2447,7 +2444,8 @@ static int __bond_release_one(struct net_device *bond_dev,
24472444
if (old_flags & IFF_ALLMULTI)
24482445
dev_set_allmulti(slave_dev, -1);
24492446

2450-
bond_hw_addr_flush(bond_dev, slave_dev);
2447+
if (old_flags & IFF_UP)
2448+
bond_hw_addr_flush(bond_dev, slave_dev);
24512449
}
24522450

24532451
slave_disable_netpoll(slave);
@@ -4184,6 +4182,12 @@ static int bond_open(struct net_device *bond_dev)
41844182
struct list_head *iter;
41854183
struct slave *slave;
41864184

4185+
if (BOND_MODE(bond) == BOND_MODE_ROUNDROBIN && !bond->rr_tx_counter) {
4186+
bond->rr_tx_counter = alloc_percpu(u32);
4187+
if (!bond->rr_tx_counter)
4188+
return -ENOMEM;
4189+
}
4190+
41874191
/* reset slave->backup and slave->inactive */
41884192
if (bond_has_slaves(bond)) {
41894193
bond_for_each_slave(bond, slave, iter) {
@@ -4221,6 +4225,9 @@ static int bond_open(struct net_device *bond_dev)
42214225
/* register to receive LACPDUs */
42224226
bond->recv_probe = bond_3ad_lacpdu_recv;
42234227
bond_3ad_initiate_agg_selection(bond, 1);
4228+
4229+
bond_for_each_slave(bond, slave, iter)
4230+
dev_mc_add(slave->dev, lacpdu_mcast_addr);
42244231
}
42254232

42264233
if (bond_mode_can_use_xmit_hash(bond))
@@ -4232,13 +4239,27 @@ static int bond_open(struct net_device *bond_dev)
42324239
static int bond_close(struct net_device *bond_dev)
42334240
{
42344241
struct bonding *bond = netdev_priv(bond_dev);
4242+
struct slave *slave;
42354243

42364244
bond_work_cancel_all(bond);
42374245
bond->send_peer_notif = 0;
42384246
if (bond_is_lb(bond))
42394247
bond_alb_deinitialize(bond);
42404248
bond->recv_probe = NULL;
42414249

4250+
if (bond_uses_primary(bond)) {
4251+
rcu_read_lock();
4252+
slave = rcu_dereference(bond->curr_active_slave);
4253+
if (slave)
4254+
bond_hw_addr_flush(bond_dev, slave->dev);
4255+
rcu_read_unlock();
4256+
} else {
4257+
struct list_head *iter;
4258+
4259+
bond_for_each_slave(bond, slave, iter)
4260+
bond_hw_addr_flush(bond_dev, slave->dev);
4261+
}
4262+
42424263
return 0;
42434264
}
42444265

@@ -6228,15 +6249,6 @@ static int bond_init(struct net_device *bond_dev)
62286249
if (!bond->wq)
62296250
return -ENOMEM;
62306251

6231-
if (BOND_MODE(bond) == BOND_MODE_ROUNDROBIN) {
6232-
bond->rr_tx_counter = alloc_percpu(u32);
6233-
if (!bond->rr_tx_counter) {
6234-
destroy_workqueue(bond->wq);
6235-
bond->wq = NULL;
6236-
return -ENOMEM;
6237-
}
6238-
}
6239-
62406252
spin_lock_init(&bond->stats_lock);
62416253
netdev_lockdep_set_classes(bond_dev);
62426254

drivers/net/can/flexcan/flexcan-core.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -941,11 +941,6 @@ static struct sk_buff *flexcan_mailbox_read(struct can_rx_offload *offload,
941941
u32 reg_ctrl, reg_id, reg_iflag1;
942942
int i;
943943

944-
if (unlikely(drop)) {
945-
skb = ERR_PTR(-ENOBUFS);
946-
goto mark_as_read;
947-
}
948-
949944
mb = flexcan_get_mb(priv, n);
950945

951946
if (priv->devtype_data.quirks & FLEXCAN_QUIRK_USE_RX_MAILBOX) {
@@ -974,6 +969,11 @@ static struct sk_buff *flexcan_mailbox_read(struct can_rx_offload *offload,
974969
reg_ctrl = priv->read(&mb->can_ctrl);
975970
}
976971

972+
if (unlikely(drop)) {
973+
skb = ERR_PTR(-ENOBUFS);
974+
goto mark_as_read;
975+
}
976+
977977
if (reg_ctrl & FLEXCAN_MB_CNT_EDL)
978978
skb = alloc_canfd_skb(offload->dev, &cfd);
979979
else

drivers/net/can/usb/gs_usb.c

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,7 @@ static int gs_can_open(struct net_device *netdev)
824824
flags |= GS_CAN_MODE_TRIPLE_SAMPLE;
825825

826826
/* finally start device */
827+
dev->can.state = CAN_STATE_ERROR_ACTIVE;
827828
dm->mode = cpu_to_le32(GS_CAN_MODE_START);
828829
dm->flags = cpu_to_le32(flags);
829830
rc = usb_control_msg(interface_to_usbdev(dev->iface),
@@ -835,13 +836,12 @@ static int gs_can_open(struct net_device *netdev)
835836
if (rc < 0) {
836837
netdev_err(netdev, "Couldn't start device (err=%d)\n", rc);
837838
kfree(dm);
839+
dev->can.state = CAN_STATE_STOPPED;
838840
return rc;
839841
}
840842

841843
kfree(dm);
842844

843-
dev->can.state = CAN_STATE_ERROR_ACTIVE;
844-
845845
parent->active_channels++;
846846
if (!(dev->can.ctrlmode & CAN_CTRLMODE_LISTENONLY))
847847
netif_start_queue(netdev);
@@ -925,17 +925,21 @@ static int gs_usb_set_identify(struct net_device *netdev, bool do_identify)
925925
}
926926

927927
/* blink LED's for finding the this interface */
928-
static int gs_usb_set_phys_id(struct net_device *dev,
928+
static int gs_usb_set_phys_id(struct net_device *netdev,
929929
enum ethtool_phys_id_state state)
930930
{
931+
const struct gs_can *dev = netdev_priv(netdev);
931932
int rc = 0;
932933

934+
if (!(dev->feature & GS_CAN_FEATURE_IDENTIFY))
935+
return -EOPNOTSUPP;
936+
933937
switch (state) {
934938
case ETHTOOL_ID_ACTIVE:
935-
rc = gs_usb_set_identify(dev, GS_CAN_IDENTIFY_ON);
939+
rc = gs_usb_set_identify(netdev, GS_CAN_IDENTIFY_ON);
936940
break;
937941
case ETHTOOL_ID_INACTIVE:
938-
rc = gs_usb_set_identify(dev, GS_CAN_IDENTIFY_OFF);
942+
rc = gs_usb_set_identify(netdev, GS_CAN_IDENTIFY_OFF);
939943
break;
940944
default:
941945
break;
@@ -1072,9 +1076,10 @@ static struct gs_can *gs_make_candev(unsigned int channel,
10721076
dev->feature |= GS_CAN_FEATURE_REQ_USB_QUIRK_LPC546XX |
10731077
GS_CAN_FEATURE_QUIRK_BREQ_CANTACT_PRO;
10741078

1075-
if (le32_to_cpu(dconf->sw_version) > 1)
1076-
if (feature & GS_CAN_FEATURE_IDENTIFY)
1077-
netdev->ethtool_ops = &gs_usb_ethtool_ops;
1079+
/* GS_CAN_FEATURE_IDENTIFY is only supported for sw_version > 1 */
1080+
if (!(le32_to_cpu(dconf->sw_version) > 1 &&
1081+
feature & GS_CAN_FEATURE_IDENTIFY))
1082+
dev->feature &= ~GS_CAN_FEATURE_IDENTIFY;
10781083

10791084
kfree(bt_const);
10801085

drivers/net/dsa/microchip/lan937x_main.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,6 @@ void lan937x_port_setup(struct ksz_device *dev, int port, bool cpu_port)
244244
lan937x_port_cfg(dev, port, REG_PORT_CTRL_0,
245245
PORT_TAIL_TAG_ENABLE, true);
246246

247-
/* disable frame check length field */
248-
lan937x_port_cfg(dev, port, REG_PORT_MAC_CTRL_0, PORT_CHECK_LENGTH,
249-
false);
250-
251247
/* set back pressure for half duplex */
252248
lan937x_port_cfg(dev, port, REG_PORT_MAC_CTRL_1, PORT_BACK_PRESSURE,
253249
true);

drivers/net/ethernet/aquantia/atlantic/aq_main.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,8 @@ static int aq_ndev_close(struct net_device *ndev)
9494
int err = 0;
9595

9696
err = aq_nic_stop(aq_nic);
97-
if (err < 0)
98-
goto err_exit;
9997
aq_nic_deinit(aq_nic, true);
10098

101-
err_exit:
10299
return err;
103100
}
104101

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,6 @@ static void bnxt_tx_int(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts)
659659

660660
for (i = 0; i < nr_pkts; i++) {
661661
struct bnxt_sw_tx_bd *tx_buf;
662-
bool compl_deferred = false;
663662
struct sk_buff *skb;
664663
int j, last;
665664

@@ -668,6 +667,8 @@ static void bnxt_tx_int(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts)
668667
skb = tx_buf->skb;
669668
tx_buf->skb = NULL;
670669

670+
tx_bytes += skb->len;
671+
671672
if (tx_buf->is_push) {
672673
tx_buf->is_push = 0;
673674
goto next_tx_int;
@@ -688,8 +689,9 @@ static void bnxt_tx_int(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts)
688689
}
689690
if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_IN_PROGRESS)) {
690691
if (bp->flags & BNXT_FLAG_CHIP_P5) {
692+
/* PTP worker takes ownership of the skb */
691693
if (!bnxt_get_tx_ts_p5(bp, skb))
692-
compl_deferred = true;
694+
skb = NULL;
693695
else
694696
atomic_inc(&bp->ptp_cfg->tx_avail);
695697
}
@@ -698,9 +700,7 @@ static void bnxt_tx_int(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts)
698700
next_tx_int:
699701
cons = NEXT_TX(cons);
700702

701-
tx_bytes += skb->len;
702-
if (!compl_deferred)
703-
dev_kfree_skb_any(skb);
703+
dev_kfree_skb_any(skb);
704704
}
705705

706706
netdev_tx_completed_queue(txq, nr_pkts, tx_bytes);

0 commit comments

Comments
 (0)