[dpdk-stable] patch 'net/ixgbe: fix MAC resource leak' has been queued to stable release 20.11.4
Xueming Li
xuemingl at nvidia.com
Wed Nov 10 07:28:44 CET 2021
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a1ebe4da329713217ef7fa82f179f82bbae1de87
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From a1ebe4da329713217ef7fa82f179f82bbae1de87 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
Cc: Xueming Li <xuemingl at nvidia.com>
[ 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 f15cc7d4ef..969e31cdbf 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1218,6 +1218,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;
}
@@ -1672,6 +1674,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.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.903348317 +0800
+++ 0040-net-ixgbe-fix-MAC-resource-leak.patch 2021-11-10 14:17:01.794080052 +0800
@@ -1 +1 @@
-From cc8aaa258f31cf28776141e2e2f9c370bbb9ae55 Mon Sep 17 00:00:00 2001
+From a1ebe4da329713217ef7fa82f179f82bbae1de87 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit cc8aaa258f31cf28776141e2e2f9c370bbb9ae55 ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org
@@ -22 +24 @@
-index 3371a7df78..47693c0c47 100644
+index f15cc7d4ef..969e31cdbf 100644
@@ -34 +36 @@
-@@ -1667,6 +1669,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1672,6 +1674,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
More information about the stable
mailing list