[PATCH] net/bnxt: handle mpc ring creation failure
Mohammad Shuab Siddique
mohammad-shuab.siddique at broadcom.com
Mon Sep 21 05:00:47 CEST 2026
From: Mohammad Shuab Siddique <mohammad-shuab.siddique at broadcom.com>
bnxt_dev_start_op() only logged at DEBUG level when bnxt_mpc_open()
failed and continued port initialization. Later action-record
updates then dereference the un-allocated MPC ring state and
segfault. Log at ERR level and abort initialization instead.
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_ethdev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 8e8ead8f61..8f629ec0e8 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1874,8 +1874,10 @@ int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
goto error;
rc = bnxt_mpc_open(bp);
- if (rc != 0)
- PMD_DRV_LOG_LINE(DEBUG, "MPC open failed");
+ if (rc != 0) {
+ PMD_DRV_LOG_LINE(ERR, "MPC open failed rc:%d", rc);
+ goto error;
+ }
rc = bnxt_alloc_prev_ring_stats(bp);
if (rc)
--
2.47.3
More information about the dev
mailing list