Skip to content

Commit 9d32fa5

Browse files
committed
Merge tag 'net-5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Networking fixes, including fixes from bpf, wireless, netfilter and wireguard trees. The bpf vs lockdown+audit fix is the most notable. Things haven't slowed down just yet, both in terms of regressions in current release and largish fixes for older code, but we usually see a slowdown only after -rc5. Current release - regressions: - virtio-net: fix page faults and crashes when XDP is enabled - mlx5e: fix HW timestamping with CQE compression, and make sure they are only allowed to coexist with capable devices - stmmac: - fix kernel panic due to NULL pointer dereference of mdio_bus_data - fix double clk unprepare when no PHY device is connected Current release - new code bugs: - mt76: a few fixes for the recent MT7921 devices and runtime power management Previous releases - regressions: - ice: - track AF_XDP ZC enabled queues in bitmap to fix copy mode Tx - fix allowing VF to request more/less queues via virtchnl - correct supported and advertised autoneg by using PHY capabilities - allow all LLDP packets from PF to Tx - kbuild: quote OBJCOPY var to avoid a pahole call break the build Previous releases - always broken: - bpf, lockdown, audit: fix buggy SELinux lockdown permission checks - mt76: address the recent FragAttack vulnerabilities not covered by generic fixes - ipv6: fix KASAN: slab-out-of-bounds Read in fib6_nh_flush_exceptions - Bluetooth: - fix the erroneous flush_work() order, to avoid double free - use correct lock to prevent UAF of hdev object - nfc: fix NULL ptr dereference in llcp_sock_getname() after failed connect - ieee802154: multiple fixes to error checking and return values - igb: fix XDP with PTP enabled - intel: add correct exception tracing for XDP - tls: fix use-after-free when TLS offload device goes down and back up - ipvs: ignore IP_VS_SVC_F_HASHED flag when adding service - netfilter: nft_ct: skip expectations for confirmed conntrack - mptcp: fix falling back to TCP in presence of out of order packets early in connection lifetime - wireguard: switch from O(n) to a O(1) algorithm for maintaining peers, fixing stalls and a large memory leak in the process Misc: - devlink: correct VIRTUAL port to not have phys_port attributes - Bluetooth: fix VIRTIO_ID_BT assigned number - net: return the correct errno code ENOBUF -> ENOMEM - wireguard: - peer: allocate in kmem_cache saving 25% on peer memory - do not use -O3" * tag 'net-5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (91 commits) cxgb4: avoid link re-train during TC-MQPRIO configuration sch_htb: fix refcount leak in htb_parent_to_leaf_offload wireguard: allowedips: free empty intermediate nodes when removing single node wireguard: allowedips: allocate nodes in kmem_cache wireguard: allowedips: remove nodes in O(1) wireguard: allowedips: initialize list head in selftest wireguard: peer: allocate in kmem_cache wireguard: use synchronize_net rather than synchronize_rcu wireguard: do not use -O3 wireguard: selftests: make sure rp_filter is disabled on vethc wireguard: selftests: remove old conntrack kconfig value virtchnl: Add missing padding to virtchnl_proto_hdrs ice: Allow all LLDP packets from PF to Tx ice: report supported and advertised autoneg using PHY capabilities ice: handle the VF VSI rebuild failure ice: Fix VFR issues for AVF drivers that expect ATQLEN cleared ice: Fix allowing VF to request more/less queues via virtchnl virtio-net: fix for skb_over_panic inside big mode ipv6: Fix KASAN: slab-out-of-bounds Read in fib6_nh_flush_exceptions fib: Return the correct errno code ...
2 parents 2cb26c1 + 3822d06 commit 9d32fa5

File tree

102 files changed

+991
-576
lines changed

Some content is hidden

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

102 files changed

+991
-576
lines changed

MAINTAINERS

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12905,7 +12905,7 @@ F: net/ipv4/nexthop.c
1290512905

1290612906
NFC SUBSYSTEM
1290712907
M: Krzysztof Kozlowski <[email protected]>
12908-
L: [email protected] (moderated for non-subscribers)
12908+
L: [email protected] (subscribers-only)
1290912909
1291012910
S: Maintained
1291112911
F: Documentation/devicetree/bindings/net/nfc/
@@ -12918,7 +12918,7 @@ F: net/nfc/
1291812918
NFC VIRTUAL NCI DEVICE DRIVER
1291912919
M: Bongsu Jeon <[email protected]>
1292012920
12921-
L: [email protected] (moderated for non-subscribers)
12921+
L: [email protected] (subscribers-only)
1292212922
S: Supported
1292312923
F: drivers/nfc/virtual_ncidev.c
1292412924
F: tools/testing/selftests/nci/
@@ -13216,7 +13216,7 @@ F: sound/soc/codecs/tfa9879*
1321613216

1321713217
NXP-NCI NFC DRIVER
1321813218
R: Charles Gorand <[email protected]>
13219-
L: [email protected] (moderated for non-subscribers)
13219+
L: [email protected] (subscribers-only)
1322013220
S: Supported
1322113221
F: drivers/nfc/nxp-nci
1322213222

@@ -16147,7 +16147,7 @@ F: include/media/drv-intf/s3c_camif.h
1614716147
SAMSUNG S3FWRN5 NFC DRIVER
1614816148
M: Krzysztof Kozlowski <[email protected]>
1614916149
M: Krzysztof Opasiak <[email protected]>
16150-
L: [email protected] (moderated for non-subscribers)
16150+
L: [email protected] (subscribers-only)
1615116151
S: Maintained
1615216152
F: Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
1615316153
F: drivers/nfc/s3fwrn5
@@ -18337,7 +18337,7 @@ F: sound/soc/codecs/tas571x*
1833718337
TI TRF7970A NFC DRIVER
1833818338
M: Mark Greer <[email protected]>
1833918339
18340-
L: [email protected] (moderated for non-subscribers)
18340+
L: [email protected] (subscribers-only)
1834118341
S: Supported
1834218342
F: Documentation/devicetree/bindings/net/nfc/trf7970a.txt
1834318343
F: drivers/nfc/trf7970a.c

drivers/bluetooth/btusb.c

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2529,10 +2529,17 @@ static int btusb_intel_download_firmware_newgen(struct hci_dev *hdev,
25292529
}
25302530

25312531
btusb_setup_intel_newgen_get_fw_name(ver, fwname, sizeof(fwname), "sfi");
2532-
err = request_firmware(&fw, fwname, &hdev->dev);
2532+
err = firmware_request_nowarn(&fw, fwname, &hdev->dev);
25332533
if (err < 0) {
2534+
if (!test_bit(BTUSB_BOOTLOADER, &data->flags)) {
2535+
/* Firmware has already been loaded */
2536+
set_bit(BTUSB_FIRMWARE_LOADED, &data->flags);
2537+
return 0;
2538+
}
2539+
25342540
bt_dev_err(hdev, "Failed to load Intel firmware file %s (%d)",
25352541
fwname, err);
2542+
25362543
return err;
25372544
}
25382545

@@ -2682,12 +2689,24 @@ static int btusb_intel_download_firmware(struct hci_dev *hdev,
26822689
err = btusb_setup_intel_new_get_fw_name(ver, params, fwname,
26832690
sizeof(fwname), "sfi");
26842691
if (err < 0) {
2692+
if (!test_bit(BTUSB_BOOTLOADER, &data->flags)) {
2693+
/* Firmware has already been loaded */
2694+
set_bit(BTUSB_FIRMWARE_LOADED, &data->flags);
2695+
return 0;
2696+
}
2697+
26852698
bt_dev_err(hdev, "Unsupported Intel firmware naming");
26862699
return -EINVAL;
26872700
}
26882701

2689-
err = request_firmware(&fw, fwname, &hdev->dev);
2702+
err = firmware_request_nowarn(&fw, fwname, &hdev->dev);
26902703
if (err < 0) {
2704+
if (!test_bit(BTUSB_BOOTLOADER, &data->flags)) {
2705+
/* Firmware has already been loaded */
2706+
set_bit(BTUSB_FIRMWARE_LOADED, &data->flags);
2707+
return 0;
2708+
}
2709+
26912710
bt_dev_err(hdev, "Failed to load Intel firmware file %s (%d)",
26922711
fwname, err);
26932712
return err;

drivers/net/ethernet/chelsio/cxgb4/cxgb4.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2177,8 +2177,6 @@ int cxgb4_update_mac_filt(struct port_info *pi, unsigned int viid,
21772177
bool persistent, u8 *smt_idx);
21782178
int cxgb4_get_msix_idx_from_bmap(struct adapter *adap);
21792179
void cxgb4_free_msix_idx_in_bmap(struct adapter *adap, u32 msix_idx);
2180-
int cxgb_open(struct net_device *dev);
2181-
int cxgb_close(struct net_device *dev);
21822180
void cxgb4_enable_rx(struct adapter *adap, struct sge_rspq *q);
21832181
void cxgb4_quiesce_rx(struct sge_rspq *q);
21842182
int cxgb4_port_mirror_alloc(struct net_device *dev);

drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2834,7 +2834,7 @@ static void cxgb_down(struct adapter *adapter)
28342834
/*
28352835
* net_device operations
28362836
*/
2837-
int cxgb_open(struct net_device *dev)
2837+
static int cxgb_open(struct net_device *dev)
28382838
{
28392839
struct port_info *pi = netdev_priv(dev);
28402840
struct adapter *adapter = pi->adapter;
@@ -2882,7 +2882,7 @@ int cxgb_open(struct net_device *dev)
28822882
return err;
28832883
}
28842884

2885-
int cxgb_close(struct net_device *dev)
2885+
static int cxgb_close(struct net_device *dev)
28862886
{
28872887
struct port_info *pi = netdev_priv(dev);
28882888
struct adapter *adapter = pi->adapter;

drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -997,20 +997,16 @@ int cxgb4_tc_flower_destroy(struct net_device *dev,
997997
if (!ch_flower)
998998
return -ENOENT;
999999

1000+
rhashtable_remove_fast(&adap->flower_tbl, &ch_flower->node,
1001+
adap->flower_ht_params);
1002+
10001003
ret = cxgb4_flow_rule_destroy(dev, ch_flower->fs.tc_prio,
10011004
&ch_flower->fs, ch_flower->filter_id);
10021005
if (ret)
1003-
goto err;
1006+
netdev_err(dev, "Flow rule destroy failed for tid: %u, ret: %d",
1007+
ch_flower->filter_id, ret);
10041008

1005-
ret = rhashtable_remove_fast(&adap->flower_tbl, &ch_flower->node,
1006-
adap->flower_ht_params);
1007-
if (ret) {
1008-
netdev_err(dev, "Flow remove from rhashtable failed");
1009-
goto err;
1010-
}
10111009
kfree_rcu(ch_flower, rcu);
1012-
1013-
err:
10141010
return ret;
10151011
}
10161012

drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,8 @@ int cxgb4_setup_tc_mqprio(struct net_device *dev,
589589
* down before configuring tc params.
590590
*/
591591
if (netif_running(dev)) {
592-
cxgb_close(dev);
592+
netif_tx_stop_all_queues(dev);
593+
netif_carrier_off(dev);
593594
needs_bring_up = true;
594595
}
595596

@@ -615,8 +616,10 @@ int cxgb4_setup_tc_mqprio(struct net_device *dev,
615616
}
616617

617618
out:
618-
if (needs_bring_up)
619-
cxgb_open(dev);
619+
if (needs_bring_up) {
620+
netif_tx_start_all_queues(dev);
621+
netif_carrier_on(dev);
622+
}
620623

621624
mutex_unlock(&adap->tc_mqprio->mqprio_mutex);
622625
return ret;

drivers/net/ethernet/chelsio/cxgb4/sge.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2556,6 +2556,12 @@ int cxgb4_ethofld_send_flowc(struct net_device *dev, u32 eotid, u32 tc)
25562556
if (!eosw_txq)
25572557
return -ENOMEM;
25582558

2559+
if (!(adap->flags & CXGB4_FW_OK)) {
2560+
/* Don't stall caller when access to FW is lost */
2561+
complete(&eosw_txq->completion);
2562+
return -EIO;
2563+
}
2564+
25592565
skb = alloc_skb(len, GFP_KERNEL);
25602566
if (!skb)
25612567
return -ENOMEM;

drivers/net/ethernet/intel/i40e/i40e_txrx.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2313,15 +2313,20 @@ static int i40e_run_xdp(struct i40e_ring *rx_ring, struct xdp_buff *xdp)
23132313
case XDP_TX:
23142314
xdp_ring = rx_ring->vsi->xdp_rings[rx_ring->queue_index];
23152315
result = i40e_xmit_xdp_tx_ring(xdp, xdp_ring);
2316+
if (result == I40E_XDP_CONSUMED)
2317+
goto out_failure;
23162318
break;
23172319
case XDP_REDIRECT:
23182320
err = xdp_do_redirect(rx_ring->netdev, xdp, xdp_prog);
2319-
result = !err ? I40E_XDP_REDIR : I40E_XDP_CONSUMED;
2321+
if (err)
2322+
goto out_failure;
2323+
result = I40E_XDP_REDIR;
23202324
break;
23212325
default:
23222326
bpf_warn_invalid_xdp_action(act);
23232327
fallthrough;
23242328
case XDP_ABORTED:
2329+
out_failure:
23252330
trace_xdp_exception(rx_ring->netdev, xdp_prog, act);
23262331
fallthrough; /* handle aborts by dropping packet */
23272332
case XDP_DROP:

drivers/net/ethernet/intel/i40e/i40e_xsk.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,10 @@ static int i40e_run_xdp_zc(struct i40e_ring *rx_ring, struct xdp_buff *xdp)
162162

163163
if (likely(act == XDP_REDIRECT)) {
164164
err = xdp_do_redirect(rx_ring->netdev, xdp, xdp_prog);
165-
result = !err ? I40E_XDP_REDIR : I40E_XDP_CONSUMED;
165+
if (err)
166+
goto out_failure;
166167
rcu_read_unlock();
167-
return result;
168+
return I40E_XDP_REDIR;
168169
}
169170

170171
switch (act) {
@@ -173,11 +174,14 @@ static int i40e_run_xdp_zc(struct i40e_ring *rx_ring, struct xdp_buff *xdp)
173174
case XDP_TX:
174175
xdp_ring = rx_ring->vsi->xdp_rings[rx_ring->queue_index];
175176
result = i40e_xmit_xdp_tx_ring(xdp, xdp_ring);
177+
if (result == I40E_XDP_CONSUMED)
178+
goto out_failure;
176179
break;
177180
default:
178181
bpf_warn_invalid_xdp_action(act);
179182
fallthrough;
180183
case XDP_ABORTED:
184+
out_failure:
181185
trace_xdp_exception(rx_ring->netdev, xdp_prog, act);
182186
fallthrough; /* handle aborts by dropping packet */
183187
case XDP_DROP:

drivers/net/ethernet/intel/ice/ice.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ struct ice_vsi {
335335
struct ice_tc_cfg tc_cfg;
336336
struct bpf_prog *xdp_prog;
337337
struct ice_ring **xdp_rings; /* XDP ring array */
338+
unsigned long *af_xdp_zc_qps; /* tracks AF_XDP ZC enabled qps */
338339
u16 num_xdp_txq; /* Used XDP queues */
339340
u8 xdp_mapping_mode; /* ICE_MAP_MODE_[CONTIG|SCATTER] */
340341

@@ -547,15 +548,16 @@ static inline void ice_set_ring_xdp(struct ice_ring *ring)
547548
*/
548549
static inline struct xsk_buff_pool *ice_xsk_pool(struct ice_ring *ring)
549550
{
551+
struct ice_vsi *vsi = ring->vsi;
550552
u16 qid = ring->q_index;
551553

552554
if (ice_ring_is_xdp(ring))
553-
qid -= ring->vsi->num_xdp_txq;
555+
qid -= vsi->num_xdp_txq;
554556

555-
if (!ice_is_xdp_ena_vsi(ring->vsi))
557+
if (!ice_is_xdp_ena_vsi(vsi) || !test_bit(qid, vsi->af_xdp_zc_qps))
556558
return NULL;
557559

558-
return xsk_get_pool_from_qid(ring->vsi->netdev, qid);
560+
return xsk_get_pool_from_qid(vsi->netdev, qid);
559561
}
560562

561563
/**

0 commit comments

Comments
 (0)