common/iavf: fix arq resource leak
PATCH 1/1 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.
--- drivers/common/iavf/iavf_adminq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/common/iavf/iavf_adminq.c +5 -1
@@ -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;
Signature · 1 line
2.30.1.windows.1
Quoted 13 lines
-----Original Message-----
From: stable <[email protected]> On Behalf Of Qiming Chen
Sent: Friday, September 10, 2021 11:13
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>; Qiming Chen <[email protected]>; [email protected]
Subject: [dpdk-stable] [PATCH] common/iavf: fix arq resource leakIn the
iavf_init_arqfunction, if an exception occurs in theiavf_config_arq_regsfunction, and the previously applied arq bufs resource is released. This patch maintains the same modification as theiavf_init_asqfunction to roll back resources.
Quoted 8 lines
Fixes 87aca6d8d8a4 ("net/iavf/base: fix command buffer memory leak")Signed-off-by Qiming Chen <[email protected]>--- 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.
Quoted 2 lines
--
2.30.1.windows.1
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.
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/[email protected]/
The right reply is as:
https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/
I’ve told you before: REPLY WITH plain text format, and REPLY inline.
BR,
Haiyue
From: Qiming Chen <[email protected]>
Sent: Friday, September 10, 2021 14:27
To: Wang, Haiyue <[email protected]>
Cc: [email protected]; Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>; [email protected]
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.
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<[email protected]> 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/[email protected]/
The right reply is as:
https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/
I’ve told you before: REPLY WITH plain text format, and REPLY inline.
BR,
Haiyue
From: Qiming Chen <[email protected]>
Sent: Friday, September 10, 2021 14:27
To: Wang, Haiyue <[email protected]>
Cc: [email protected]; Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>; [email protected]
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.
Quoted 15 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Qiming Chen
Sent: Friday, September 10, 2021 11:13 AM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>; Qiming Chen <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] common/iavf: fix arq resource leakIn the
iavf_init_arqfunction, if an exception occurs in theiavf_config_arq_regsfunction, and the previously applied arq bufs resource is released. This patch maintains the same modification as theiavf_init_asqfunction to roll back resources.
Quoted 4 lines
Fixes 87aca6d8d8a4 ("net/iavf/base: fix command buffer memory leak")Signed-off-by Qiming Chen <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi