From: Bruce Richardson <bruce.richardson@intel.com>
To: Anurag Mandal <anurag.mandal@intel.com>
Cc: <dev@dpdk.org>, <anatoly.burakov@intel.com>, <stable@dpdk.org>
Subject: Re: [PATCH 1/8] net/ice: fix DCF hardware init error path
Date: Fri, 6 Nov 2026 11:42:57 +0000 [thread overview]
Message-ID: <au29QZplzBw-OSzF@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <a248ef94491e9ae863ece11f316d400989c8880c.1793871697.git.anurag.mandal@intel.com>
On Thu, Nov 05, 2026 at 09:47:18AM +0000, Anurag Mandal wrote:
> ice_dcf_init_hw() never frees the VF VSI map on its error paths,
> so it leaks when any step after getting the map fails.
>
> Similarly, when getting the VLAN offload V2 capabilities fails,
> the error path leaves the interrupt callback registered and
> enabled, and leaks the QoS bandwidth config array.
> As the DCF hardware structure passed to the callback is freed
> with the port when probe fails, a later interrupt would use
> freed memory.
>
> Free the VSI map, and add an error label that disables the
> interrupt, unregisters the callback and frees the QoS array.
>
> Fixes: 9a7980cfdf67 ("net/ice: complete VLAN offload capability for DCF")
> Fixes: 8e1cf1823191 ("net/ice: init RSS and supported RXDID in DCF")
> Fixes: 7564d5509611 ("net/ice: add DCF hardware initialization")
> Cc: stable@dpdk.org
>
> Signed-off-by: Anurag Mandal <anurag.mandal@intel.com>
> ---
> drivers/net/intel/ice/ice_dcf.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
One comment inline below. [I can fix on apply if no other issues with the
set]
> diff --git a/drivers/net/intel/ice/ice_dcf.c b/drivers/net/intel/ice/ice_dcf.c
> index 976f2ed260..d87655c11d 100644
> --- a/drivers/net/intel/ice/ice_dcf.c
> +++ b/drivers/net/intel/ice/ice_dcf.c
> @@ -853,14 +853,23 @@ ice_dcf_init_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw)
>
> if ((hw->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN_V2) &&
> dcf_get_vlan_offload_caps_v2(hw))
> - goto err_rss;
> + goto err_intr;
>
> return 0;
>
> +err_intr:
> + ice_dcf_disable_irq0(hw);
> + rte_intr_disable(pci_dev->intr_handle);
> + rte_intr_callback_unregister(pci_dev->intr_handle,
> + ice_dcf_dev_interrupt_handler, hw);
AI review points out that this would be better using unregister_sync rather
than just unregister.
> + rte_free(hw->qos_bw_cfg);
> + hw->qos_bw_cfg = NULL;
> err_rss:
> rte_free(hw->rss_key);
> rte_free(hw->rss_lut);
> err_alloc:
> + rte_free(hw->vf_vsi_map);
> + hw->vf_vsi_map = NULL;
> rte_free(hw->vf_res);
> err_api:
> iavf_shutdown_adminq(&hw->avf);
> --
> 2.25.1
>
next prev parent reply other threads:[~2026-11-06 11:43 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 9:47 [PATCH 0/8] net/ice: fix DCF memory leaks Anurag Mandal
2026-11-05 9:47 ` [PATCH 1/8] net/ice: fix DCF hardware init error path Anurag Mandal
2026-11-06 11:42 ` Bruce Richardson [this message]
2026-11-05 9:47 ` [PATCH 2/8] net/ice: fix DCF parent adapter " Anurag Mandal
2026-11-06 11:54 ` Bruce Richardson
2026-11-05 9:47 ` [PATCH 3/8] net/ice: fix DCF queue config buffer leak Anurag Mandal
2026-11-06 11:59 ` Bruce Richardson
2026-11-05 9:47 ` [PATCH 4/8] net/ice: fix DCF QoS buffer leak on commit Anurag Mandal
2026-11-06 12:02 ` Bruce Richardson
2026-11-05 9:47 ` [PATCH 5/8] net/ice: fix DCF QoS bandwidth replay config leak Anurag Mandal
2026-11-06 12:06 ` Bruce Richardson
2026-11-05 9:47 ` [PATCH 6/8] net/ice: fix DCF TM config leak on close Anurag Mandal
2026-11-06 12:09 ` Bruce Richardson
2026-11-05 9:47 ` [PATCH 7/8] net/ice: fix DCF representor info " Anurag Mandal
2026-11-06 12:15 ` Bruce Richardson
2026-11-05 9:47 ` [PATCH 8/8] net/ice: fix DCF port leak on probe failure Anurag Mandal
2026-11-06 12:18 ` Bruce Richardson
2026-11-07 23:52 ` [PATCH v2 0/8] net/ice: fix DCF memory leaks Anurag Mandal
2026-11-07 23:52 ` [PATCH v2 1/8] net/ice: fix DCF hardware init error path Anurag Mandal
2026-11-07 23:52 ` [PATCH v2 2/8] net/ice: fix DCF parent adapter " Anurag Mandal
2026-11-07 23:52 ` [PATCH v2 3/8] net/ice: fix DCF queue config buffer leak Anurag Mandal
2026-11-07 23:52 ` [PATCH v2 4/8] net/ice: fix DCF QoS buffer leak on commit Anurag Mandal
2026-11-07 23:52 ` [PATCH v2 5/8] net/ice: fix DCF QoS bandwidth replay config leak Anurag Mandal
2026-11-09 17:40 ` Bruce Richardson
2026-11-07 23:52 ` [PATCH v2 6/8] net/ice: fix DCF TM config leak on close Anurag Mandal
2026-11-07 23:52 ` [PATCH v2 7/8] net/ice: fix DCF representor info " Anurag Mandal
2026-11-07 23:52 ` [PATCH v2 8/8] net/ice: fix DCF port leak on probe failure Anurag Mandal
2026-11-09 17:50 ` [PATCH v2 0/8] net/ice: fix DCF memory leaks Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=au29QZplzBw-OSzF@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=anurag.mandal@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox