DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/bnxt: fix flow db lock-free issue during shutdown
@ 2026-10-05 15:16 Manish Kurup
  0 siblings, 0 replies; only message in thread
From: Manish Kurup @ 2026-10-05 15:16 UTC (permalink / raw)
  To: dev; +Cc: kishore.padmanabha, Farah Smith, stable

From: Farah Smith <farah.smith@broadcom.com>

In ulp_tfc_deinit(), ulp_tfc_tbl_scope_deinit() was called after
pthread_mutex_destroy() had already destroyed the flow db lock
(flow_db_lock) instead of before it. Reorder so table scope
cleanup completes before the lock is destroyed.

Fixes: dd0191d5e70d ("net/bnxt/tf_ulp: support Thor2 ULP layer")
Cc: stable@dpdk.org

Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Signed-off-by: Manish Kurup <manish.kurup@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
index d5ce4c3c18..cc85f3b486 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
@@ -957,11 +957,11 @@ ulp_tfc_deinit(struct bnxt *bp,
 	/* Delete the Port database */
 	ulp_port_db_deinit(bp->ulp_ctx);
 
+	ulp_tfc_tbl_scope_deinit(bp);
+
 	/* free the flow db lock */
 	pthread_mutex_destroy(&bp->ulp_ctx->cfg_data->flow_db_lock);
 
-	ulp_tfc_tbl_scope_deinit(bp);
-
 	rc = tfc_session_fid_rem(&bp->tfcp, bp->fw_fid, &fid_cnt);
 	if (rc)
 		BNXT_DRV_DBG(ERR, "Failed to remove RFID:%d from SID:%d\n",
-- 
2.31.1


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

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

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-05 15:16 [PATCH] net/bnxt: fix flow db lock-free issue during shutdown Manish Kurup

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