[dpdk-stable] patch 'net/iavf/base: fix command buffer memory leak' has been queued to stable release 19.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Feb 11 12:19:50 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From 7a5755e521cd4ccebd624ffd8cff45462d7331d0 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang at intel.com>
Date: Tue, 3 Dec 2019 15:03:12 +0800
Subject: [PATCH] net/iavf/base: fix command buffer memory leak

[ upstream commit 87aca6d8d8a452ce0d3534dd80bab28ff8e66b58 ]

Allocated resources were not freed in the event of failure in
iavf_init_asq function. This patch gracefully handles all failures.

Fixes: e5b2a9e957e7 ("net/avf/base: add base code for avf PMD")

Signed-off-by: Pandi Kumar Maharajan <pandi.maharajan at intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr at intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
Acked-by: Qiming Yang <qiming.yang at intel.com>
---
 drivers/net/iavf/base/iavf_adminq.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/base/iavf_adminq.c b/drivers/net/iavf/base/iavf_adminq.c
index 1ba8b52219..a8b989aea9 100644
--- a/drivers/net/iavf/base/iavf_adminq.c
+++ b/drivers/net/iavf/base/iavf_adminq.c
@@ -84,6 +84,7 @@ enum iavf_status_code iavf_alloc_adminq_arq_ring(struct iavf_hw *hw)
  **/
 void iavf_free_adminq_asq(struct iavf_hw *hw)
 {
+	iavf_free_virt_mem(hw, &hw->aq.asq.cmd_buf);
 	iavf_free_dma_mem(hw, &hw->aq.asq.desc_buf);
 }
 
@@ -367,7 +368,7 @@ enum iavf_status_code iavf_init_asq(struct iavf_hw *hw)
 	/* initialize base registers */
 	ret_code = iavf_config_asq_regs(hw);
 	if (ret_code != IAVF_SUCCESS)
-		goto init_adminq_free_rings;
+		goto init_config_regs;
 
 	/* success! */
 	hw->aq.asq.count = hw->aq.num_asq_entries;
@@ -375,6 +376,10 @@ enum iavf_status_code iavf_init_asq(struct iavf_hw *hw)
 
 init_adminq_free_rings:
 	iavf_free_adminq_asq(hw);
+	return ret_code;
+
+init_config_regs:
+	iavf_free_asq_bufs(hw);
 
 init_adminq_exit:
 	return ret_code;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-11 11:17:40.642702341 +0000
+++ 0044-net-iavf-base-fix-command-buffer-memory-leak.patch	2020-02-11 11:17:38.392001197 +0000
@@ -1,13 +1,14 @@
-From 87aca6d8d8a452ce0d3534dd80bab28ff8e66b58 Mon Sep 17 00:00:00 2001
+From 7a5755e521cd4ccebd624ffd8cff45462d7331d0 Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang at intel.com>
 Date: Tue, 3 Dec 2019 15:03:12 +0800
 Subject: [PATCH] net/iavf/base: fix command buffer memory leak
 
+[ upstream commit 87aca6d8d8a452ce0d3534dd80bab28ff8e66b58 ]
+
 Allocated resources were not freed in the event of failure in
 iavf_init_asq function. This patch gracefully handles all failures.
 
 Fixes: e5b2a9e957e7 ("net/avf/base: add base code for avf PMD")
-Cc: stable at dpdk.org
 
 Signed-off-by: Pandi Kumar Maharajan <pandi.maharajan at intel.com>
 Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr at intel.com>
@@ -18,10 +19,10 @@
  1 file changed, 6 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/iavf/base/iavf_adminq.c b/drivers/net/iavf/base/iavf_adminq.c
-index ef352ac4c4..298e77277e 100644
+index 1ba8b52219..a8b989aea9 100644
 --- a/drivers/net/iavf/base/iavf_adminq.c
 +++ b/drivers/net/iavf/base/iavf_adminq.c
-@@ -82,6 +82,7 @@ enum iavf_status iavf_alloc_adminq_arq_ring(struct iavf_hw *hw)
+@@ -84,6 +84,7 @@ enum iavf_status_code iavf_alloc_adminq_arq_ring(struct iavf_hw *hw)
   **/
  void iavf_free_adminq_asq(struct iavf_hw *hw)
  {
@@ -29,7 +30,7 @@
  	iavf_free_dma_mem(hw, &hw->aq.asq.desc_buf);
  }
  
-@@ -353,7 +354,7 @@ enum iavf_status iavf_init_asq(struct iavf_hw *hw)
+@@ -367,7 +368,7 @@ enum iavf_status_code iavf_init_asq(struct iavf_hw *hw)
  	/* initialize base registers */
  	ret_code = iavf_config_asq_regs(hw);
  	if (ret_code != IAVF_SUCCESS)
@@ -38,7 +39,7 @@
  
  	/* success! */
  	hw->aq.asq.count = hw->aq.num_asq_entries;
-@@ -361,6 +362,10 @@ enum iavf_status iavf_init_asq(struct iavf_hw *hw)
+@@ -375,6 +376,10 @@ enum iavf_status_code iavf_init_asq(struct iavf_hw *hw)
  
  init_adminq_free_rings:
  	iavf_free_adminq_asq(hw);


More information about the stable mailing list