patch 'net/ice/base: fix memory leak in firmware version check' has been queued to stable release 23.11.2
Xueming Li
xuemingl at nvidia.com
Mon Aug 12 14:48:49 CEST 2024
Hi,
FYI, your patch has been queued to stable release 23.11.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=7a6c0e6212a2b74e1b3ea6c39672c93be8f63f3a
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 7a6c0e6212a2b74e1b3ea6c39672c93be8f63f3a Mon Sep 17 00:00:00 2001
From: Eric Joyner <eric.joyner at intel.com>
Date: Tue, 25 Jun 2024 12:12:25 +0100
Subject: [PATCH] net/ice/base: fix memory leak in firmware version check
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 6b75956aacc081d56a36ab8f82c530832b288c01 ]
If ice_cfg_phy_fec() goes through case ICE_FEC_DIS_AUTO but the
underlying device firmware isn't the correct version, then the memory
used to hold the PHY capabilities output from the firmware isn't freed.
Fix this by making sure the memory is freed by jumping to the label that
frees the memory instead of returning from the version check
immediately.
Fixes: 4b6ede113f55 ("net/ice/base: support auto FEC with FEC disabled")
Signed-off-by: Eric Joyner <eric.joyner at intel.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
drivers/net/ice/base/ice_common.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 8867279c28..dcf008175e 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -3890,8 +3890,10 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
break;
case ICE_FEC_DIS_AUTO:
/* Set No FEC and auto FEC */
- if (!ice_fw_supports_fec_dis_auto(hw))
- return ICE_ERR_NOT_SUPPORTED;
+ if (!ice_fw_supports_fec_dis_auto(hw)) {
+ status = ICE_ERR_NOT_SUPPORTED;
+ goto out;
+ }
cfg->link_fec_opt |= ICE_AQC_PHY_FEC_DIS;
/* fall-through */
case ICE_FEC_AUTO:
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-08-12 20:44:04.259234461 +0800
+++ 0052-net-ice-base-fix-memory-leak-in-firmware-version-che.patch 2024-08-12 20:44:02.065069289 +0800
@@ -1 +1 @@
-From 6b75956aacc081d56a36ab8f82c530832b288c01 Mon Sep 17 00:00:00 2001
+From 7a6c0e6212a2b74e1b3ea6c39672c93be8f63f3a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 6b75956aacc081d56a36ab8f82c530832b288c01 ]
@@ -15 +17,0 @@
-Cc: stable at dpdk.org
@@ -25 +27 @@
-index 3d787d2a29..ef6696cddf 100644
+index 8867279c28..dcf008175e 100644
@@ -28 +30 @@
-@@ -3843,8 +3843,10 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
+@@ -3890,8 +3890,10 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
More information about the stable
mailing list