patch 'net/ixgbe: fix MAC resource leak' has been queued to stable release 19.11.11

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Nov 30 17:33:47 CET 2021


Hi,

FYI, your patch has been queued to stable release 19.11.11

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before December 10th 2021. 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.

Queued patches are on a temporary branch at:
https://github.com/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/eb965c7d46148a2f1fb5fd5006de9717e71a66dd

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From eb965c7d46148a2f1fb5fd5006de9717e71a66dd Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei at 163.com>
Date: Wed, 1 Sep 2021 15:12:07 +0800
Subject: [PATCH] net/ixgbe: fix MAC resource leak

[ upstream commit cc8aaa258f31cf28776141e2e2f9c370bbb9ae55 ]

In the eth_ixgbevf_dev_init and eth_ixgbe_dev_init functions, memory is
allocated for the MAC address, and the address is stored in the
eth_dev->data->mac_addrs member variable. If the subsequent function is
abnormal, you need to use the rte_free function to release the MAC
address memory.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Qiming Chen <chenqiming_huawei at 163.com>
Acked-by: Haiyue Wang <haiyue.wang at intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index a938729da7..a9607e7914 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1259,6 +1259,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 		PMD_INIT_LOG(ERR,
 			     "Failed to allocate %d bytes needed to store MAC addresses",
 			     RTE_ETHER_ADDR_LEN * IXGBE_VMDQ_NUM_UC_MAC);
+		rte_free(eth_dev->data->mac_addrs);
+		eth_dev->data->mac_addrs = NULL;
 		return -ENOMEM;
 	}
 
@@ -1719,6 +1721,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
 
 	default:
 		PMD_INIT_LOG(ERR, "VF Initialization Failure: %d", diag);
+		rte_free(eth_dev->data->mac_addrs);
+		eth_dev->data->mac_addrs = NULL;
 		return -EIO;
 	}
 
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-30 16:50:07.470518905 +0100
+++ 0023-net-ixgbe-fix-MAC-resource-leak.patch	2021-11-30 16:50:05.594872092 +0100
@@ -1 +1 @@
-From cc8aaa258f31cf28776141e2e2f9c370bbb9ae55 Mon Sep 17 00:00:00 2001
+From eb965c7d46148a2f1fb5fd5006de9717e71a66dd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cc8aaa258f31cf28776141e2e2f9c370bbb9ae55 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index 3371a7df78..47693c0c47 100644
+index a938729da7..a9607e7914 100644
@@ -25 +26 @@
-@@ -1218,6 +1218,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1259,6 +1259,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -34 +35 @@
-@@ -1667,6 +1669,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1719,6 +1721,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)


More information about the stable mailing list