Skip to content

Commit 75439bc

Browse files
committed
Merge tag 'net-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Networking fixes for 5.11-rc5, including fixes from bpf, wireless, and can trees. Current release - regressions: - nfc: nci: fix the wrong NCI_CORE_INIT parameters Current release - new code bugs: - bpf: allow empty module BTFs Previous releases - regressions: - bpf: fix signed_{sub,add32}_overflows type handling - tcp: do not mess with cloned skbs in tcp_add_backlog() - bpf: prevent double bpf_prog_put call from bpf_tracing_prog_attach - bpf: don't leak memory in bpf getsockopt when optlen == 0 - tcp: fix potential use-after-free due to double kfree() - mac80211: fix encryption issues with WEP - devlink: use right genl user_ptr when handling port param get/set - ipv6: set multicast flag on the multicast route - tcp: fix TCP_USER_TIMEOUT with zero window Previous releases - always broken: - bpf: local storage helpers should check nullness of owner ptr passed - mac80211: fix incorrect strlen of .write in debugfs - cls_flower: call nla_ok() before nla_next() - skbuff: back tiny skbs with kmalloc() in __netdev_alloc_skb() too" * tag 'net-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (52 commits) net: systemport: free dev before on error path net: usb: cdc_ncm: don't spew notifications net: mscc: ocelot: Fix multicast to the CPU port tcp: Fix potential use-after-free due to double kfree() bpf: Fix signed_{sub,add32}_overflows type handling can: peak_usb: fix use after free bugs can: vxcan: vxcan_xmit: fix use after free bug can: dev: can_restart: fix use after free bug tcp: fix TCP socket rehash stats mis-accounting net: dsa: b53: fix an off by one in checking "vlan->vid" tcp: do not mess with cloned skbs in tcp_add_backlog() selftests: net: fib_tests: remove duplicate log test net: nfc: nci: fix the wrong NCI_CORE_INIT parameters sh_eth: Fix power down vs. is_opened flag ordering net: Disable NETIF_F_HW_TLS_RX when RXCSUM is disabled netfilter: rpfilter: mask ecn bits before fib lookup udp: mask TOS bits in udp_v4_early_demux() xsk: Clear pool even for inactive queues bpf: Fix helper bpf_map_peek_elem_proto pointing to wrong callback sh_eth: Make PHY access aware of Runtime PM to fix reboot crash ...
2 parents 2e4ceed + 535d315 commit 75439bc

57 files changed

Lines changed: 380 additions & 252 deletions

Some content is hidden

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

‎.mailmap‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ Bart Van Assche <bvanassche@acm.org> <bart.vanassche@wdc.com>
5555
Ben Gardner <bgardner@wabtec.com>
5656
Ben M Cahill <ben.m.cahill@intel.com>
5757
Björn Steinbrink <B.Steinbrink@gmx.de>
58+
Björn Töpel <bjorn@kernel.org> <bjorn.topel@gmail.com>
59+
Björn Töpel <bjorn@kernel.org> <bjorn.topel@intel.com>
5860
Boris Brezillon <bbrezillon@kernel.org> <b.brezillon.dev@gmail.com>
5961
Boris Brezillon <bbrezillon@kernel.org> <b.brezillon@overkiz.com>
6062
Boris Brezillon <bbrezillon@kernel.org> <boris.brezillon@bootlin.com>

‎Documentation/networking/tls-offload.rst‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,3 +534,6 @@ offload. Hence, TLS TX device feature flag requires TX csum offload being set.
534534
Disabling the latter implies clearing the former. Disabling TX checksum offload
535535
should not affect old connections, and drivers should make sure checksum
536536
calculation does not break for them.
537+
Similarly, device-offloaded TLS decryption implies doing RXCSUM. If the user
538+
does not want to enable RX csum offload, TLS RX device feature is disabled
539+
as well.

‎MAINTAINERS‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3334,7 +3334,7 @@ F: arch/riscv/net/
33343334
X: arch/riscv/net/bpf_jit_comp64.c
33353335

33363336
BPF JIT for RISC-V (64-bit)
3337-
M: Björn Töpel <bjorn.topel@gmail.com>
3337+
M: Björn Töpel <bjorn@kernel.org>
33383338
L: netdev@vger.kernel.org
33393339
L: bpf@vger.kernel.org
33403340
S: Maintained
@@ -19416,7 +19416,7 @@ F: drivers/net/ethernet/*/*/*xdp*
1941619416
K: (?:\b|_)xdp(?:\b|_)
1941719417

1941819418
XDP SOCKETS (AF_XDP)
19419-
M: Björn Töpel <bjorn.topel@intel.com>
19419+
M: Björn Töpel <bjorn@kernel.org>
1942019420
M: Magnus Karlsson <magnus.karlsson@intel.com>
1942119421
R: Jonathan Lemon <jonathan.lemon@gmail.com>
1942219422
L: netdev@vger.kernel.org

‎drivers/net/can/dev.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,11 +592,11 @@ static void can_restart(struct net_device *dev)
592592

593593
cf->can_id |= CAN_ERR_RESTARTED;
594594

595-
netif_rx_ni(skb);
596-
597595
stats->rx_packets++;
598596
stats->rx_bytes += cf->len;
599597

598+
netif_rx_ni(skb);
599+
600600
restart:
601601
netdev_dbg(dev, "restarted\n");
602602
priv->can_stats.restarts++;

‎drivers/net/can/usb/peak_usb/pcan_usb_fd.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,11 +514,11 @@ static int pcan_usb_fd_decode_canmsg(struct pcan_usb_fd_if *usb_if,
514514
else
515515
memcpy(cfd->data, rm->d, cfd->len);
516516

517-
peak_usb_netif_rx(skb, &usb_if->time_ref, le32_to_cpu(rm->ts_low));
518-
519517
netdev->stats.rx_packets++;
520518
netdev->stats.rx_bytes += cfd->len;
521519

520+
peak_usb_netif_rx(skb, &usb_if->time_ref, le32_to_cpu(rm->ts_low));
521+
522522
return 0;
523523
}
524524

@@ -580,11 +580,11 @@ static int pcan_usb_fd_decode_status(struct pcan_usb_fd_if *usb_if,
580580
if (!skb)
581581
return -ENOMEM;
582582

583-
peak_usb_netif_rx(skb, &usb_if->time_ref, le32_to_cpu(sm->ts_low));
584-
585583
netdev->stats.rx_packets++;
586584
netdev->stats.rx_bytes += cf->len;
587585

586+
peak_usb_netif_rx(skb, &usb_if->time_ref, le32_to_cpu(sm->ts_low));
587+
588588
return 0;
589589
}
590590

‎drivers/net/can/vxcan.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ static netdev_tx_t vxcan_xmit(struct sk_buff *skb, struct net_device *dev)
3939
struct net_device *peer;
4040
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
4141
struct net_device_stats *peerstats, *srcstats = &dev->stats;
42+
u8 len;
4243

4344
if (can_dropped_invalid_skb(dev, skb))
4445
return NETDEV_TX_OK;
@@ -61,12 +62,13 @@ static netdev_tx_t vxcan_xmit(struct sk_buff *skb, struct net_device *dev)
6162
skb->dev = peer;
6263
skb->ip_summed = CHECKSUM_UNNECESSARY;
6364

65+
len = cfd->len;
6466
if (netif_rx_ni(skb) == NET_RX_SUCCESS) {
6567
srcstats->tx_packets++;
66-
srcstats->tx_bytes += cfd->len;
68+
srcstats->tx_bytes += len;
6769
peerstats = &peer->stats;
6870
peerstats->rx_packets++;
69-
peerstats->rx_bytes += cfd->len;
71+
peerstats->rx_bytes += len;
7072
}
7173

7274
out_unlock:

‎drivers/net/dsa/b53/b53_common.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ int b53_vlan_prepare(struct dsa_switch *ds, int port,
14041404
!(vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED))
14051405
return -EINVAL;
14061406

1407-
if (vlan->vid_end > dev->num_vlans)
1407+
if (vlan->vid_end >= dev->num_vlans)
14081408
return -ERANGE;
14091409

14101410
b53_enable_vlan(dev, true, ds->vlan_filtering);

‎drivers/net/dsa/mv88e6xxx/global1_vtu.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,10 @@ int mv88e6250_g1_vtu_getnext(struct mv88e6xxx_chip *chip,
351351
if (err)
352352
return err;
353353

354+
err = mv88e6185_g1_stu_data_read(chip, entry);
355+
if (err)
356+
return err;
357+
354358
/* VTU DBNum[3:0] are located in VTU Operation 3:0
355359
* VTU DBNum[5:4] are located in VTU Operation 9:8
356360
*/

‎drivers/net/ethernet/broadcom/bcmsysport.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,8 +2503,10 @@ static int bcm_sysport_probe(struct platform_device *pdev)
25032503
priv = netdev_priv(dev);
25042504

25052505
priv->clk = devm_clk_get_optional(&pdev->dev, "sw_sysport");
2506-
if (IS_ERR(priv->clk))
2507-
return PTR_ERR(priv->clk);
2506+
if (IS_ERR(priv->clk)) {
2507+
ret = PTR_ERR(priv->clk);
2508+
goto err_free_netdev;
2509+
}
25082510

25092511
/* Allocate number of TX rings */
25102512
priv->tx_rings = devm_kcalloc(&pdev->dev, txq,

‎drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,9 @@ int rvu_mbox_handler_cgx_mac_addr_set(struct rvu *rvu,
469469
int pf = rvu_get_pf(req->hdr.pcifunc);
470470
u8 cgx_id, lmac_id;
471471

472+
if (!is_cgx_config_permitted(rvu, req->hdr.pcifunc))
473+
return -EPERM;
474+
472475
rvu_get_cgx_lmac_id(rvu->pf2cgxlmac_map[pf], &cgx_id, &lmac_id);
473476

474477
cgx_lmac_addr_set(cgx_id, lmac_id, req->mac_addr);
@@ -485,6 +488,9 @@ int rvu_mbox_handler_cgx_mac_addr_get(struct rvu *rvu,
485488
int rc = 0, i;
486489
u64 cfg;
487490

491+
if (!is_cgx_config_permitted(rvu, req->hdr.pcifunc))
492+
return -EPERM;
493+
488494
rvu_get_cgx_lmac_id(rvu->pf2cgxlmac_map[pf], &cgx_id, &lmac_id);
489495

490496
rsp->hdr.rc = rc;

0 commit comments

Comments
 (0)