DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/bnxt: fix memory corruption in tunnel entry list
@ 2026-10-05 20:25 Manish Kurup
  0 siblings, 0 replies; only message in thread
From: Manish Kurup @ 2026-10-05 20:25 UTC (permalink / raw)
  To: dev; +Cc: kishore.padmanabha, stable

From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

When the app tunnel table is full, ref_cnt is never zero, so
free_entry ends up as -1 and the wrong tunnel slot gets updated.
Use the correct index instead of free_entry.

Fixes: bdf4a3c6316b ("net/bnxt: support tunnel offload")
Cc: stable@dpdk.org

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Manish Kurup <manish.kurup@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_tun.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_tun.c b/drivers/net/bnxt/tf_ulp/ulp_tun.c
index b90b4bf252..8ecdac0dcc 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_tun.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_tun.c
@@ -33,7 +33,7 @@ ulp_app_tun_search_entry(struct bnxt_ulp_context *ulp_ctx,
 				    app_tunnel,
 				    sizeof(struct rte_flow_tunnel))) {
 				*tun_entry =  &tun_ent_list[i];
-				tun_ent_list[free_entry].ref_cnt++;
+				tun_ent_list[i].ref_cnt++;
 				return rc;
 			}
 		}
-- 
2.31.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-05 20:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-05 20:25 [PATCH] net/bnxt: fix memory corruption in tunnel entry list Manish Kurup

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox