* [dpdk-stable] [PATCH 20.11] net/i40e: fix vf resource leakage problem
@ 2021-09-06 7:11 Qiming Chen
2021-09-08 3:53 ` Xing, Beilei
0 siblings, 1 reply; 3+ messages in thread
From: Qiming Chen @ 2021-09-06 7:11 UTC (permalink / raw)
To: stable; +Cc: beilei.xing, Qiming Chen
In the i40evf_dev_init function, when the MAC memory alloc fails, the
previously initialized vf resource is not released, resulting in leakage.
The patch calls the i40evf_uninit_vf function in the abnormal branch to
release resources.
Fixes: 5c9222058df7 ("i40e: move to drivers/net/")
Cc: stable@dpdk.org
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 003d41373b..f64db72e9a 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1622,6 +1622,7 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
PMD_INIT_LOG(ERR, "Failed to allocate %d bytes needed to"
" store MAC addresses",
RTE_ETHER_ADDR_LEN * I40E_NUM_MACADDR_MAX);
+ (void)i40evf_uninit_vf(eth_dev);
return -ENOMEM;
}
rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
--
2.30.1.windows.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [PATCH 20.11] net/i40e: fix vf resource leakage problem
2021-09-06 7:11 [dpdk-stable] [PATCH 20.11] net/i40e: fix vf resource leakage problem Qiming Chen
@ 2021-09-08 3:53 ` Xing, Beilei
2021-11-08 11:44 ` Xueming(Steven) Li
0 siblings, 1 reply; 3+ messages in thread
From: Xing, Beilei @ 2021-09-08 3:53 UTC (permalink / raw)
To: Qiming Chen, stable
> -----Original Message-----
> From: Qiming Chen <chenqiming_huawei@163.com>
> Sent: Monday, September 6, 2021 3:12 PM
> To: stable@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Qiming Chen
> <chenqiming_huawei@163.com>
> Subject: [PATCH 20.11] net/i40e: fix vf resource leakage problem
Please also refine the title.
>
> In the i40evf_dev_init function, when the MAC memory alloc fails, the
> previously initialized vf resource is not released, resulting in leakage.
> The patch calls the i40evf_uninit_vf function in the abnormal branch to
> release resources.
>
> Fixes: 5c9222058df7 ("i40e: move to drivers/net/")
The fix commit should be " i40e: new poll mode driver".
> Cc: stable@dpdk.org
>
> Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
> ---
> drivers/net/i40e/i40e_ethdev_vf.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c
> b/drivers/net/i40e/i40e_ethdev_vf.c
> index 003d41373b..f64db72e9a 100644
> --- a/drivers/net/i40e/i40e_ethdev_vf.c
> +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> @@ -1622,6 +1622,7 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
> PMD_INIT_LOG(ERR, "Failed to allocate %d bytes needed to"
> " store MAC addresses",
> RTE_ETHER_ADDR_LEN *
> I40E_NUM_MACADDR_MAX);
> + (void)i40evf_uninit_vf(eth_dev);
> return -ENOMEM;
> }
> rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
> --
> 2.30.1.windows.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [PATCH 20.11] net/i40e: fix vf resource leakage problem
2021-09-08 3:53 ` Xing, Beilei
@ 2021-11-08 11:44 ` Xueming(Steven) Li
0 siblings, 0 replies; 3+ messages in thread
From: Xueming(Steven) Li @ 2021-11-08 11:44 UTC (permalink / raw)
To: beilei.xing, chenqiming_huawei, stable
On Wed, 2021-09-08 at 03:53 +0000, Xing, Beilei wrote:
>
> > -----Original Message-----
> > From: Qiming Chen <chenqiming_huawei@163.com>
> > Sent: Monday, September 6, 2021 3:12 PM
> > To: stable@dpdk.org
> > Cc: Xing, Beilei <beilei.xing@intel.com>; Qiming Chen
> > <chenqiming_huawei@163.com>
> > Subject: [PATCH 20.11] net/i40e: fix vf resource leakage problem
> Please also refine the title.
>
> >
> > In the i40evf_dev_init function, when the MAC memory alloc fails, the
> > previously initialized vf resource is not released, resulting in leakage.
> > The patch calls the i40evf_uninit_vf function in the abnormal branch to
> > release resources.
> >
> > Fixes: 5c9222058df7 ("i40e: move to drivers/net/")
> The fix commit should be " i40e: new poll mode driver".
>
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
> > ---
> > drivers/net/i40e/i40e_ethdev_vf.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c
> > b/drivers/net/i40e/i40e_ethdev_vf.c
> > index 003d41373b..f64db72e9a 100644
> > --- a/drivers/net/i40e/i40e_ethdev_vf.c
> > +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> > @@ -1622,6 +1622,7 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
> > PMD_INIT_LOG(ERR, "Failed to allocate %d bytes needed to"
> > " store MAC addresses",
> > RTE_ETHER_ADDR_LEN *
> > I40E_NUM_MACADDR_MAX);
> > + (void)i40evf_uninit_vf(eth_dev);
> > return -ENOMEM;
> > }
> > rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
> > --
> > 2.30.1.windows.1
>
Hi Qiming,
To catch up v20.11.4, could you address Beilei's comments and send v2?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-08 11:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06 7:11 [dpdk-stable] [PATCH 20.11] net/i40e: fix vf resource leakage problem Qiming Chen
2021-09-08 3:53 ` Xing, Beilei
2021-11-08 11:44 ` Xueming(Steven) Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).