patch 'net/bnxt: fix memory leak in VF VNIC query error path' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Oct 27 12:50:58 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.9

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f6aa87d8467f1bb7b079cd8d7c75722de305bd23

Thanks.

Luca Boccassi

---
>From f6aa87d8467f1bb7b079cd8d7c75722de305bd23 Mon Sep 17 00:00:00 2001
From: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
Date: Tue, 29 Sep 2026 12:04:18 -0600
Subject: [PATCH] net/bnxt: fix memory leak in VF VNIC query error path

[ upstream commit 374a9e57a59c847aede1d68474ac90787e3b2922 ]

bnxt_hwrm_func_vf_vnic_query_and_config() allocates vnic_ids before
calling bnxt_hwrm_func_vf_vnic_query(), but returns without freeing it
when that call fails.

Free vnic_ids on the error path too.

Fixes: 49947a13ba9e ("net/bnxt: support Tx loopback, set VF MAC and queues drop")

Signed-off-by: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
Signed-off-by: Mohammad Shuab Siddique <mohammad-shuab.siddique at broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 056dfba4098..e4c5770d11e 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -6261,8 +6261,10 @@ int bnxt_hwrm_func_vf_vnic_query_and_config(struct bnxt *bp, uint16_t vf,
 
 	num_vnic_ids = bnxt_hwrm_func_vf_vnic_query(bp, vf, vnic_ids);
 
-	if (num_vnic_ids < 0)
+	if (num_vnic_ids < 0) {
+		rte_free(vnic_ids);
 		return num_vnic_ids;
+	}
 
 	/* Retrieve VNIC, update bd_stall then update */
 
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-10-27 11:44:00.025374968 +0000
+++ 0164-net-bnxt-fix-memory-leak-in-VF-VNIC-query-error-path.patch	2026-10-27 11:43:53.738066382 +0000
@@ -1 +1 @@
-From 374a9e57a59c847aede1d68474ac90787e3b2922 Mon Sep 17 00:00:00 2001
+From f6aa87d8467f1bb7b079cd8d7c75722de305bd23 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 374a9e57a59c847aede1d68474ac90787e3b2922 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index d533965217..29b18a5cf1 100644
+index 056dfba4098..e4c5770d11e 100644
@@ -25 +26 @@
-@@ -6278,8 +6278,10 @@ int bnxt_hwrm_func_vf_vnic_query_and_config(struct bnxt *bp, uint16_t vf,
+@@ -6261,8 +6261,10 @@ int bnxt_hwrm_func_vf_vnic_query_and_config(struct bnxt *bp, uint16_t vf,


More information about the stable mailing list