DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/bnxt: fix flow create segfault
@ 2026-09-18  3:27 Mohammad Shuab Siddique
  2026-09-21  2:18 ` [PATCH v2] " Mohammad Shuab Siddique
  2026-09-29  0:23 ` [PATCH v3] " Mohammad Shuab Siddique
  0 siblings, 2 replies; 4+ messages in thread
From: Mohammad Shuab Siddique @ 2026-09-18  3:27 UTC (permalink / raw)
  To: dev; +Cc: kishore.padmanabha, Mohammad Shuab Siddique, stable,
	Dakota Sicher

From: Mohammad Shuab Siddique <mohammad-shuab.siddique@broadcom.com>

When creating a flow that requires a destination queue but none is
specified in the flow create command, find_matching_vnic() returns
NULL and the code falls through to insert the new filter into
vnic->filter, dereferencing the NULL vnic and causing a segfault.

Check for a NULL vnic and reject the flow create with a clear error
instead of crashing.

Fixes: 59119d49529e ("net/bnxt: fix flow create when RSS is disabled")
Cc: stable@dpdk.org

Signed-off-by: Dakota Sicher <dakota.sicher@broadcom.com>
Signed-off-by: Mohammad Shuab Siddique <mohammad-shuab.siddique@broadcom.com>
---
 drivers/net/bnxt/bnxt_flow.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index a2e590540b..0a2899fbbd 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -2148,6 +2148,13 @@ bnxt_flow_create(struct rte_eth_dev *dev,
 	}
 
 	vnic = find_matching_vnic(bp, filter);
+	if (!vnic) {
+		rte_flow_error_set(error, EINVAL,
+				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+				   "Missing destination action for flow.");
+		bnxt_clear_one_vnic_filter(bp, filter);
+		goto free_filter;
+	}
 done:
 	if (!ret || update_flow) {
 		flow->filter = filter;
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-29  0:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-18  3:27 [PATCH] net/bnxt: fix flow create segfault Mohammad Shuab Siddique
2026-09-21  2:18 ` [PATCH v2] " Mohammad Shuab Siddique
2026-09-21 15:46   ` Stephen Hemminger
2026-09-29  0:23 ` [PATCH v3] " Mohammad Shuab Siddique

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