Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue

Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2023-06-08 (ice)

This series contains updates to ice driver only.

Simon Horman stops null pointer dereference for GNSS error path.

Kamil fixes memory leak when downing interface when XDP is enabled.

* '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
  ice: Fix XDP memory leak when NIC is brought up and down
  ice: Don't dereference NULL in ice_gnss_read error path
====================

Link: https://lore.kernel.org/r/20230608200051.451752-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski 2023-06-10 00:11:18 -07:00
commit 1b8975f30a
2 changed files with 5 additions and 7 deletions

View File

@ -96,12 +96,7 @@ static void ice_gnss_read(struct kthread_work *work)
int err = 0; int err = 0;
pf = gnss->back; pf = gnss->back;
if (!pf) { if (!pf || !test_bit(ICE_FLAG_GNSS, pf->flags))
err = -EFAULT;
goto exit;
}
if (!test_bit(ICE_FLAG_GNSS, pf->flags))
return; return;
hw = &pf->hw; hw = &pf->hw;
@ -159,7 +154,6 @@ static void ice_gnss_read(struct kthread_work *work)
free_page((unsigned long)buf); free_page((unsigned long)buf);
requeue: requeue:
kthread_queue_delayed_work(gnss->kworker, &gnss->read_work, delay); kthread_queue_delayed_work(gnss->kworker, &gnss->read_work, delay);
exit:
if (err) if (err)
dev_dbg(ice_pf_to_dev(pf), "GNSS failed to read err=%d\n", err); dev_dbg(ice_pf_to_dev(pf), "GNSS failed to read err=%d\n", err);
} }

View File

@ -7056,6 +7056,10 @@ int ice_down(struct ice_vsi *vsi)
ice_for_each_txq(vsi, i) ice_for_each_txq(vsi, i)
ice_clean_tx_ring(vsi->tx_rings[i]); ice_clean_tx_ring(vsi->tx_rings[i]);
if (ice_is_xdp_ena_vsi(vsi))
ice_for_each_xdp_txq(vsi, i)
ice_clean_tx_ring(vsi->xdp_rings[i]);
ice_for_each_rxq(vsi, i) ice_for_each_rxq(vsi, i)
ice_clean_rx_ring(vsi->rx_rings[i]); ice_clean_rx_ring(vsi->rx_rings[i]);