* [PATCH v1 1/1] net/iavf: fix resource leak on IPsec init fail
@ 2026-09-15 8:37 Anatoly Burakov
2026-09-18 13:59 ` Radu Nicolau
0 siblings, 1 reply; 3+ messages in thread
From: Anatoly Burakov @ 2026-09-15 8:37 UTC (permalink / raw)
To: dev, Vladimir Medvedkin, Qiming Chen, Qi Zhang
Currently, during `dev_init`, we try to create a security context. At that
point we have already initialized the rte_flow engines, so any subsequent
failures must trigger flow engines uninit. However, if we fail to create a
security context (or if its initialization fails), we do not uninit the
rte_flow engines. Fix the code to do so on failure.
Fixes: 45570d7e4439 ("net/iavf: fix resource leak on probing failure")
Cc: chenqiming_huawei@163.com
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/net/intel/iavf/iavf_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index 2ac4dbdac4f..2b2eb4a93f8 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -3153,7 +3153,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
ret = iavf_security_ctx_create(adapter);
if (ret) {
PMD_INIT_LOG(ERR, "failed to create ipsec crypto security instance");
- goto flow_init_err;
+ goto security_init_err;
}
ret = iavf_security_init(adapter);
@@ -3183,6 +3183,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
security_init_err:
iavf_security_ctx_destroy(adapter);
+ iavf_flow_uninit(adapter);
flow_init_err:
vf->aq_intr_enabled = false;
--
2.52.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] net/iavf: fix resource leak on IPsec init fail
2026-09-15 8:37 [PATCH v1 1/1] net/iavf: fix resource leak on IPsec init fail Anatoly Burakov
@ 2026-09-18 13:59 ` Radu Nicolau
2026-09-18 14:03 ` Bruce Richardson
0 siblings, 1 reply; 3+ messages in thread
From: Radu Nicolau @ 2026-09-18 13:59 UTC (permalink / raw)
To: Anatoly Burakov, dev, Vladimir Medvedkin, Qiming Chen, Qi Zhang
On 15-Sep-26 9:37 AM, Anatoly Burakov wrote:
> Currently, during `dev_init`, we try to create a security context. At that
> point we have already initialized the rte_flow engines, so any subsequent
> failures must trigger flow engines uninit. However, if we fail to create a
> security context (or if its initialization fails), we do not uninit the
> rte_flow engines. Fix the code to do so on failure.
>
> Fixes: 45570d7e4439 ("net/iavf: fix resource leak on probing failure")
> Cc: chenqiming_huawei@163.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] net/iavf: fix resource leak on IPsec init fail
2026-09-18 13:59 ` Radu Nicolau
@ 2026-09-18 14:03 ` Bruce Richardson
0 siblings, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2026-09-18 14:03 UTC (permalink / raw)
To: Radu Nicolau
Cc: Anatoly Burakov, dev, Vladimir Medvedkin, Qiming Chen, Qi Zhang
On Fri, Sep 18, 2026 at 02:59:33PM +0100, Radu Nicolau wrote:
>
> On 15-Sep-26 9:37 AM, Anatoly Burakov wrote:
> > Currently, during `dev_init`, we try to create a security context. At that
> > point we have already initialized the rte_flow engines, so any subsequent
> > failures must trigger flow engines uninit. However, if we fail to create a
> > security context (or if its initialization fails), we do not uninit the
> > rte_flow engines. Fix the code to do so on failure.
> >
> > Fixes: 45570d7e4439 ("net/iavf: fix resource leak on probing failure")
> > Cc: chenqiming_huawei@163.com
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> > ---
> >
> Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Applied to dpdk-next-net-intel.
Thanks,
/Bruce
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-18 14:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-15 8:37 [PATCH v1 1/1] net/iavf: fix resource leak on IPsec init fail Anatoly Burakov
2026-09-18 13:59 ` Radu Nicolau
2026-09-18 14:03 ` Bruce Richardson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox