Skip to content

Commit 8d0112a

Browse files
committed
Merge tag 'net-5.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from bpf, mac80211. Current release - regressions: - devlink: don't throw an error if flash notification sent before devlink visible - page_pool: Revert "page_pool: disable dma mapping support...", turns out there are active arches who need it Current release - new code bugs: - amt: cancel delayed_work synchronously in amt_fini() Previous releases - regressions: - xsk: fix crash on double free in buffer pool - bpf: fix inner map state pruning regression causing program rejections - mac80211: drop check for DONT_REORDER in __ieee80211_select_queue, preventing mis-selecting the best effort queue - mac80211: do not access the IV when it was stripped - mac80211: fix radiotap header generation, off-by-one - nl80211: fix getting radio statistics in survey dump - e100: fix device suspend/resume Previous releases - always broken: - tcp: fix uninitialized access in skb frags array for Rx 0cp - bpf: fix toctou on read-only map's constant scalar tracking - bpf: forbid bpf_ktime_get_coarse_ns and bpf_timer_* in tracing progs - tipc: only accept encrypted MSG_CRYPTO msgs - smc: transfer remaining wait queue entries during fallback, fix missing wake ups - udp: validate checksum in udp_read_sock() (when sockmap is used) - sched: act_mirred: drop dst for the direction from egress to ingress - virtio_net_hdr_to_skb: count transport header in UFO, prevent allowing bad skbs into the stack - nfc: reorder the logic in nfc_{un,}register_device, fix unregister - ipsec: check return value of ipv6_skip_exthdr - usb: r8152: add MAC passthrough support for more Lenovo Docks" * tag 'net-5.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (96 commits) ptp: ocp: Fix a couple NULL vs IS_ERR() checks net: ethernet: dec: tulip: de4x5: fix possible array overflows in type3_infoblock() net: tulip: de4x5: fix the problem that the array 'lp->phy[8]' may be out of bound ipv6: check return value of ipv6_skip_exthdr e100: fix device suspend/resume devlink: Don't throw an error if flash notification sent before devlink visible page_pool: Revert "page_pool: disable dma mapping support..." ethernet: hisilicon: hns: hns_dsaf_misc: fix a possible array overflow in hns_dsaf_ge_srst_by_port() octeontx2-af: debugfs: don't corrupt user memory NFC: add NCI_UNREG flag to eliminate the race NFC: reorder the logic in nfc_{un,}register_device NFC: reorganize the functions in nci_request tipc: check for null after calling kmemdup i40e: Fix display error code in dmesg i40e: Fix creation of first queue by omitting it if is not power of two i40e: Fix warning message and call stack during rmmod i40e driver i40e: Fix ping is lost after configuring ADq on VF i40e: Fix changing previously set num_queue_pairs for PFs i40e: Fix NULL ptr dereference on VSI filter sync i40e: Fix correct max_pkt_size on VF RX queue ...
2 parents 6fdf886 + c7521d3 commit 8d0112a

File tree

102 files changed

+1314
-507
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

+1314
-507
lines changed

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3733,7 +3733,7 @@ F: drivers/scsi/bnx2i/
37333733
BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER
37343734
M: Ariel Elior <aelior@marvell.com>
37353735
M: Sudarsana Kalluru <skalluru@marvell.com>
3736-
M: GR-everest-linux-l2@marvell.com
3736+
M: Manish Chopra <manishc@marvell.com>
37373737
L: netdev@vger.kernel.org
37383738
S: Supported
37393739
F: drivers/net/ethernet/broadcom/bnx2x/
@@ -15593,7 +15593,7 @@ F: drivers/scsi/qedi/
1559315593

1559415594
QLOGIC QL4xxx ETHERNET DRIVER
1559515595
M: Ariel Elior <aelior@marvell.com>
15596-
M: GR-everest-linux-l2@marvell.com
15596+
M: Manish Chopra <manishc@marvell.com>
1559715597
L: netdev@vger.kernel.org
1559815598
S: Supported
1559915599
F: drivers/net/ethernet/qlogic/qed/

drivers/net/amt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3286,7 +3286,7 @@ static void __exit amt_fini(void)
32863286
{
32873287
rtnl_link_unregister(&amt_link_ops);
32883288
unregister_netdevice_notifier(&amt_notifier_block);
3289-
cancel_delayed_work(&source_gc_wq);
3289+
cancel_delayed_work_sync(&source_gc_wq);
32903290
__amt_source_gc_work();
32913291
destroy_workqueue(amt_wq);
32923292
}

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,11 @@ int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self,
559559
goto err_exit;
560560

561561
if (fw.len == 0xFFFFU) {
562+
if (sw.len > sizeof(self->rpc)) {
563+
printk(KERN_INFO "Invalid sw len: %x\n", sw.len);
564+
err = -EINVAL;
565+
goto err_exit;
566+
}
562567
err = hw_atl_utils_fw_rpc_call(self, sw.len);
563568
if (err < 0)
564569
goto err_exit;
@@ -567,6 +572,11 @@ int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self,
567572

568573
if (rpc) {
569574
if (fw.len) {
575+
if (fw.len > sizeof(self->rpc)) {
576+
printk(KERN_INFO "Invalid fw len: %x\n", fw.len);
577+
err = -EINVAL;
578+
goto err_exit;
579+
}
570580
err =
571581
hw_atl_utils_fw_downld_dwords(self,
572582
self->rpc_addr,

drivers/net/ethernet/asix/ax88796c_main.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ struct ax88796c_device {
127127
#define AX_PRIV_FLAGS_MASK (AX_CAP_COMP)
128128

129129
unsigned long flags;
130-
#define EVENT_INTR BIT(0)
131-
#define EVENT_TX BIT(1)
132-
#define EVENT_SET_MULTI BIT(2)
130+
#define EVENT_INTR 0
131+
#define EVENT_TX 1
132+
#define EVENT_SET_MULTI 2
133133

134134
};
135135

drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,11 +635,13 @@ static int bnx2x_ilt_client_mem_op(struct bnx2x *bp, int cli_num,
635635
{
636636
int i, rc;
637637
struct bnx2x_ilt *ilt = BP_ILT(bp);
638-
struct ilt_client_info *ilt_cli = &ilt->clients[cli_num];
638+
struct ilt_client_info *ilt_cli;
639639

640640
if (!ilt || !ilt->lines)
641641
return -1;
642642

643+
ilt_cli = &ilt->clients[cli_num];
644+
643645
if (ilt_cli->flags & (ILT_CLIENT_SKIP_INIT | ILT_CLIENT_SKIP_MEM))
644646
return 0;
645647

drivers/net/ethernet/broadcom/bnxt/bnxt.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,6 +2258,16 @@ static inline void bnxt_db_write(struct bnxt *bp, struct bnxt_db_info *db,
22582258
}
22592259
}
22602260

2261+
/* Must hold rtnl_lock */
2262+
static inline bool bnxt_sriov_cfg(struct bnxt *bp)
2263+
{
2264+
#if defined(CONFIG_BNXT_SRIOV)
2265+
return BNXT_PF(bp) && (bp->pf.active_vfs || bp->sriov_cfg);
2266+
#else
2267+
return false;
2268+
#endif
2269+
}
2270+
22612271
extern const u16 bnxt_lhint_arr[];
22622272

22632273
int bnxt_alloc_rx_data(struct bnxt *bp, struct bnxt_rx_ring_info *rxr,

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ bnxt_dl_livepatch_report_err(struct bnxt *bp, struct netlink_ext_ack *extack,
360360
NL_SET_ERR_MSG_MOD(extack, "Live patch already applied");
361361
break;
362362
default:
363-
netdev_err(bp->dev, "Unexpected live patch error: %hhd\n", err);
363+
netdev_err(bp->dev, "Unexpected live patch error: %d\n", err);
364364
NL_SET_ERR_MSG_MOD(extack, "Failed to activate live patch");
365365
break;
366366
}
@@ -441,12 +441,13 @@ static int bnxt_dl_reload_down(struct devlink *dl, bool netns_change,
441441

442442
switch (action) {
443443
case DEVLINK_RELOAD_ACTION_DRIVER_REINIT: {
444-
if (BNXT_PF(bp) && bp->pf.active_vfs) {
444+
rtnl_lock();
445+
if (bnxt_sriov_cfg(bp)) {
445446
NL_SET_ERR_MSG_MOD(extack,
446-
"reload is unsupported when VFs are allocated");
447+
"reload is unsupported while VFs are allocated or being configured");
448+
rtnl_unlock();
447449
return -EOPNOTSUPP;
448450
}
449-
rtnl_lock();
450451
if (bp->dev->reg_state == NETREG_UNREGISTERED) {
451452
rtnl_unlock();
452453
return -ENODEV;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1868,7 +1868,7 @@ static int bnxt_tc_setup_indr_block_cb(enum tc_setup_type type,
18681868
struct flow_cls_offload *flower = type_data;
18691869
struct bnxt *bp = priv->bp;
18701870

1871-
if (flower->common.chain_index)
1871+
if (!tc_cls_can_offload_and_chain0(bp->dev, type_data))
18721872
return -EOPNOTSUPP;
18731873

18741874
switch (type) {

drivers/net/ethernet/dec/tulip/de4x5.c

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4709,6 +4709,10 @@ type3_infoblock(struct net_device *dev, u_char count, u_char *p)
47094709
lp->ibn = 3;
47104710
lp->active = *p++;
47114711
if (MOTO_SROM_BUG) lp->active = 0;
4712+
/* if (MOTO_SROM_BUG) statement indicates lp->active could
4713+
* be 8 (i.e. the size of array lp->phy) */
4714+
if (WARN_ON(lp->active >= ARRAY_SIZE(lp->phy)))
4715+
return -EINVAL;
47124716
lp->phy[lp->active].gep = (*p ? p : NULL); p += (2 * (*p) + 1);
47134717
lp->phy[lp->active].rst = (*p ? p : NULL); p += (2 * (*p) + 1);
47144718
lp->phy[lp->active].mc = get_unaligned_le16(p); p += 2;
@@ -5000,19 +5004,23 @@ mii_get_phy(struct net_device *dev)
50005004
}
50015005
if ((j == limit) && (i < DE4X5_MAX_MII)) {
50025006
for (k=0; k < DE4X5_MAX_PHY && lp->phy[k].id; k++);
5003-
lp->phy[k].addr = i;
5004-
lp->phy[k].id = id;
5005-
lp->phy[k].spd.reg = GENERIC_REG; /* ANLPA register */
5006-
lp->phy[k].spd.mask = GENERIC_MASK; /* 100Mb/s technologies */
5007-
lp->phy[k].spd.value = GENERIC_VALUE; /* TX & T4, H/F Duplex */
5008-
lp->mii_cnt++;
5009-
lp->active++;
5010-
printk("%s: Using generic MII device control. If the board doesn't operate,\nplease mail the following dump to the author:\n", dev->name);
5011-
j = de4x5_debug;
5012-
de4x5_debug |= DEBUG_MII;
5013-
de4x5_dbg_mii(dev, k);
5014-
de4x5_debug = j;
5015-
printk("\n");
5007+
if (k < DE4X5_MAX_PHY) {
5008+
lp->phy[k].addr = i;
5009+
lp->phy[k].id = id;
5010+
lp->phy[k].spd.reg = GENERIC_REG; /* ANLPA register */
5011+
lp->phy[k].spd.mask = GENERIC_MASK; /* 100Mb/s technologies */
5012+
lp->phy[k].spd.value = GENERIC_VALUE; /* TX & T4, H/F Duplex */
5013+
lp->mii_cnt++;
5014+
lp->active++;
5015+
printk("%s: Using generic MII device control. If the board doesn't operate,\nplease mail the following dump to the author:\n", dev->name);
5016+
j = de4x5_debug;
5017+
de4x5_debug |= DEBUG_MII;
5018+
de4x5_dbg_mii(dev, k);
5019+
de4x5_debug = j;
5020+
printk("\n");
5021+
} else {
5022+
goto purgatory;
5023+
}
50165024
}
50175025
}
50185026
purgatory:

drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4550,10 +4550,10 @@ static int dpaa2_eth_remove(struct fsl_mc_device *ls_dev)
45504550

45514551
fsl_mc_portal_free(priv->mc_io);
45524552

4553-
free_netdev(net_dev);
4554-
45554553
dev_dbg(net_dev->dev.parent, "Removed interface %s\n", net_dev->name);
45564554

4555+
free_netdev(net_dev);
4556+
45574557
return 0;
45584558
}
45594559

0 commit comments

Comments
 (0)