patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] common/iavf: fix arq resource leak
@ 2021-09-10  3:12 Qiming Chen
  2021-09-10  3:29 ` Wang, Haiyue
  2021-09-27  7:12 ` [dpdk-stable] [dpdk-dev] " Zhang, Qi Z
  0 siblings, 2 replies; 6+ messages in thread
From: Qiming Chen @ 2021-09-10  3:12 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, jingjing.wu, Qiming Chen, stable

In the iavf_init_arq function, if an exception occurs in the
iavf_config_arq_regs function, and the previously applied arq bufs
resource is released. This patch maintains the same modification
as the iavf_init_asq function to roll back resources.

Fixes: 87aca6d8d8a4 ("net/iavf/base: fix command buffer memory leak")
Cc: stable@dpdk.org

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
---
 drivers/common/iavf/iavf_adminq.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/common/iavf/iavf_adminq.c b/drivers/common/iavf/iavf_adminq.c
index 0bf5af0cbe..9c36e8908e 100644
--- a/drivers/common/iavf/iavf_adminq.c
+++ b/drivers/common/iavf/iavf_adminq.c
@@ -417,7 +417,7 @@ enum iavf_status iavf_init_arq(struct iavf_hw *hw)
 	/* initialize base registers */
 	ret_code = iavf_config_arq_regs(hw);
 	if (ret_code != IAVF_SUCCESS)
-		goto init_adminq_free_rings;
+		goto init_config_regs;
 
 	/* success! */
 	hw->aq.arq.count = hw->aq.num_arq_entries;
@@ -425,6 +425,10 @@ enum iavf_status iavf_init_arq(struct iavf_hw *hw)
 
 init_adminq_free_rings:
 	iavf_free_adminq_arq(hw);
+	return ret_code;
+
+init_config_regs:
+	iavf_free_arq_bufs(hw);
 
 init_adminq_exit:
 	return ret_code;
-- 
2.30.1.windows.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-stable] [PATCH] common/iavf: fix arq resource leak
  2021-09-10  3:12 [dpdk-stable] [PATCH] common/iavf: fix arq resource leak Qiming Chen
@ 2021-09-10  3:29 ` Wang, Haiyue
  2021-09-10  6:26   ` Qiming Chen
  2021-09-27  7:12 ` [dpdk-stable] [dpdk-dev] " Zhang, Qi Z
  1 sibling, 1 reply; 6+ messages in thread
From: Wang, Haiyue @ 2021-09-10  3:29 UTC (permalink / raw)
  To: Qiming Chen, dev; +Cc: Xing, Beilei, Wu, Jingjing, stable

> -----Original Message-----
> From: stable <stable-bounces@dpdk.org> On Behalf Of Qiming Chen
> Sent: Friday, September 10, 2021 11:13
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Qiming Chen
> <chenqiming_huawei@163.com>; stable@dpdk.org
> Subject: [dpdk-stable] [PATCH] common/iavf: fix arq resource leak
> 
> In the iavf_init_arq function, if an exception occurs in the
> iavf_config_arq_regs function, and the previously applied arq bufs
> resource is released. This patch maintains the same modification
> as the iavf_init_asq function to roll back resources.
> 
> Fixes: 87aca6d8d8a4 ("net/iavf/base: fix command buffer memory leak")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
> ---
>  drivers/common/iavf/iavf_adminq.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 

Can't image that you ARE superman to cover ixgbe,ixgbevf, i40e, now iavf.

It MUST BE done by some code scan tool, I don't believe you have real time to
read the whole code. Right ?

Sometimes, Defensive programming is good, but ... I prefer to the PMD
can run well every time, if failed, it must have some bugs.


> --
> 2.30.1.windows.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-stable] [PATCH] common/iavf: fix arq resource leak
  2021-09-10  3:29 ` Wang, Haiyue
@ 2021-09-10  6:26   ` Qiming Chen
  2021-09-10  6:35     ` Wang, Haiyue
  0 siblings, 1 reply; 6+ messages in thread
From: Qiming Chen @ 2021-09-10  6:26 UTC (permalink / raw)
  To: haiyue.wang; +Cc: dev, beilei.xing, jingjing.wu, stable

Thanks your reply.


You are right. The resource leak is indeed scanned by tools, and then manually confirmed whether it is a problem. 
Our team has been developing and maintaining for many years. Because the company process is not perfect, 
the bug has not been promoted to the community, resulting in a lot of accumulation. I am currently Complete these things step by step.


In the near future, I hope you will give more guidance and maintain the dpdk intel driver together.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-stable] [PATCH] common/iavf: fix arq resource leak
  2021-09-10  6:26   ` Qiming Chen
@ 2021-09-10  6:35     ` Wang, Haiyue
  2021-09-10  7:07       ` Qiming Chen
  0 siblings, 1 reply; 6+ messages in thread
From: Wang, Haiyue @ 2021-09-10  6:35 UTC (permalink / raw)
  To: Qiming Chen; +Cc: dev, Xing, Beilei, Wu, Jingjing, stable

Thanks for the tool.

Anyway, please setup your mail firstly.

Your mail reply is bad for community, you can see what it looks like:
http://patchwork.dpdk.org/project/dpdk/patch/20210910031249.11534-1-chenqiming_huawei@163.com/

The right reply is as:
https://patchwork.dpdk.org/project/dpdk/patch/20210910135205.269651-1-wenwux.ma@intel.com/

I’ve told you before: REPLY WITH plain text format, and REPLY inline.

BR,
Haiyue

From: Qiming Chen <chenqiming_huawei@163.com> 
Sent: Friday, September 10, 2021 14:27
To: Wang, Haiyue <haiyue.wang@intel.com>
Cc: dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] common/iavf: fix arq resource leak

Thanks your reply.

You are right. The resource leak is indeed scanned by tools, and then manually confirmed whether it is a problem. 
Our team has been developing and maintaining for many years. Because the company process is not perfect, 
the bug has not been promoted to the community, resulting in a lot of accumulation. I am currently Complete these things step by step.

In the near future, I hope you will give more guidance and maintain the dpdk intel driver together.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-stable] [PATCH] common/iavf: fix arq resource leak
  2021-09-10  6:35     ` Wang, Haiyue
@ 2021-09-10  7:07       ` Qiming Chen
  0 siblings, 0 replies; 6+ messages in thread
From: Qiming Chen @ 2021-09-10  7:07 UTC (permalink / raw)
  To: haiyue.wang; +Cc: dev, beilei.xing, jingjing.wu, stable

Can you tell me how to set up email reply? I don’t quite understand what you said about inline replies, and the green text and ">" are automatically generated?


On 9/10/2021 14:35,Wang, Haiyue<haiyue.wang@intel.com> wrote:
Thanks for the tool.

Anyway, please setup your mail firstly.

Your mail reply is bad for community, you can see what it looks like:
http://patchwork.dpdk.org/project/dpdk/patch/20210910031249.11534-1-chenqiming_huawei@163.com/

The right reply is as:
https://patchwork.dpdk.org/project/dpdk/patch/20210910135205.269651-1-wenwux.ma@intel.com/

I’ve told you before: REPLY WITH plain text format, and REPLY inline.

BR,
Haiyue

From: Qiming Chen <chenqiming_huawei@163.com>
Sent: Friday, September 10, 2021 14:27
To: Wang, Haiyue <haiyue.wang@intel.com>
Cc: dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] common/iavf: fix arq resource leak

Thanks your reply.

You are right. The resource leak is indeed scanned by tools, and then manually confirmed whether it is a problem. 
Our team has been developing and maintaining for many years. Because the company process is not perfect, 
the bug has not been promoted to the community, resulting in a lot of accumulation. I am currently Complete these things step by step.

In the near future, I hope you will give more guidance and maintain the dpdk intel driver together.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] common/iavf: fix arq resource leak
  2021-09-10  3:12 [dpdk-stable] [PATCH] common/iavf: fix arq resource leak Qiming Chen
  2021-09-10  3:29 ` Wang, Haiyue
@ 2021-09-27  7:12 ` Zhang, Qi Z
  1 sibling, 0 replies; 6+ messages in thread
From: Zhang, Qi Z @ 2021-09-27  7:12 UTC (permalink / raw)
  To: Qiming Chen, dev; +Cc: Xing, Beilei, Wu, Jingjing, stable



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Qiming Chen
> Sent: Friday, September 10, 2021 11:13 AM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Qiming Chen <chenqiming_huawei@163.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] common/iavf: fix arq resource leak
> 
> In the iavf_init_arq function, if an exception occurs in the iavf_config_arq_regs
> function, and the previously applied arq bufs resource is released. This patch
> maintains the same modification as the iavf_init_asq function to roll back
> resources.
> 
> Fixes: 87aca6d8d8a4 ("net/iavf/base: fix command buffer memory leak")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-27  7:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10  3:12 [dpdk-stable] [PATCH] common/iavf: fix arq resource leak Qiming Chen
2021-09-10  3:29 ` Wang, Haiyue
2021-09-10  6:26   ` Qiming Chen
2021-09-10  6:35     ` Wang, Haiyue
2021-09-10  7:07       ` Qiming Chen
2021-09-27  7:12 ` [dpdk-stable] [dpdk-dev] " Zhang, Qi Z

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).