Merge branch 'intel-wired-lan-driver-updates-2026-11-12-i40e-iavf'

Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2026-11-12 (i40e, iavf) [part]

For i40e:
Filip Balluch fixes incorrectly provided Tx rings in error path of
i40e_set_ringparam().

Alex further fixes the error path clearing the netdev from temporary
Tx ring's before it's freed.

For iavf:
Xuanqiang Luo fixes a couple of memory leaks and prevents NULL
pointer dereferences by implementing missing PTP callbacks.
====================

Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
This commit is contained in:
Jakub Kicinski
2026-11-18 17:49:43 -08:00
4 changed files with 21 additions and 2 deletions
@@ -2143,6 +2143,8 @@ static int i40e_set_ringparam(struct net_device *netdev,
i--;
if (!i40e_active_tx_ring_index(vsi, i))
continue;
/* not live yet, skip its BQL reset on free */
tx_rings[i].netdev = NULL;
i40e_free_tx_resources(&tx_rings[i]);
}
kfree(tx_rings);
@@ -2248,8 +2250,11 @@ free_tx:
/* error cleanup if the Rx allocations failed after getting Tx */
if (tx_rings) {
for (i = 0; i < tx_alloc_queue_pairs; i++) {
if (i40e_active_tx_ring_index(vsi, i))
i40e_free_tx_resources(vsi->tx_rings[i]);
if (i40e_active_tx_ring_index(vsi, i)) {
/* not live yet, skip its BQL reset on free */
tx_rings[i].netdev = NULL;
i40e_free_tx_resources(&tx_rings[i]);
}
}
kfree(tx_rings);
tx_rings = NULL;
@@ -60,6 +60,7 @@ static enum iavf_status iavf_alloc_adminq_arq_ring(struct iavf_hw *hw)
**/
static void iavf_free_adminq_asq(struct iavf_hw *hw)
{
iavf_free_virt_mem(hw, &hw->aq.asq.cmd_buf);
iavf_free_dma_mem(hw, &hw->aq.asq.desc_buf);
}
@@ -5638,6 +5638,7 @@ static void iavf_remove(struct pci_dev *pdev)
iounmap(hw->hw_addr);
pci_release_regions(pdev);
kfree(adapter->vf_res);
kfree(adapter->qos_caps);
spin_lock_bh(&adapter->mac_vlan_list_lock);
/* If we got removed before an up/down sequence, we've got a filter
* hanging out there that we need to get rid of.
@@ -252,6 +252,16 @@ static int iavf_ptp_gettimex64(struct ptp_clock_info *info,
return iavf_read_phc_indirect(adapter, ts, sts);
}
static int iavf_ptp_adjfine(struct ptp_clock_info *info, long scaled_ppm)
{
return -EOPNOTSUPP;
}
static int iavf_ptp_adjtime(struct ptp_clock_info *info, s64 delta)
{
return -EOPNOTSUPP;
}
static int iavf_ptp_settime64(struct ptp_clock_info *info,
const struct timespec64 *ts)
{
@@ -326,6 +336,8 @@ static int iavf_ptp_register_clock(struct iavf_adapter *adapter)
KBUILD_MODNAME, dev_name(dev));
ptp_info->owner = THIS_MODULE;
ptp_info->gettimex64 = iavf_ptp_gettimex64;
ptp_info->adjfine = iavf_ptp_adjfine;
ptp_info->adjtime = iavf_ptp_adjtime;
ptp_info->settime64 = iavf_ptp_settime64;
ptp_info->do_aux_work = iavf_ptp_do_aux_work;