DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Manish Kurup <manish.kurup@broadcom.com>
To: dev@dpdk.org
Cc: kishore.padmanabha@broadcom.com,
	Joey Zhong <xiaozhen.zhong@broadcom.com>,
	stable@dpdk.org
Subject: [PATCH] net/bnxt: fix HA timer spinlock leak
Date: Mon,  5 Oct 2026 18:50:49 -0500	[thread overview]
Message-ID: <20261005235049.27024-1-manish.kurup@broadcom.com> (raw)

From: Joey Zhong <xiaozhen.zhong@broadcom.com>

ulp_ha_mgr_timer_cb() acquires the global ULP context spinlock via
bnxt_ulp_cntxt_entry_acquire(). When myclient_cnt is transiently 0,
the function did a bare return without calling
bnxt_ulp_cntxt_entry_release(), leaking the lock and deadlocking all
subsequent flow operations on the device.

Replace the bare return with goto cb_restart, matching every other
error path in the callback: it releases the lock and restarts the
timer. Since a zero client count is transient, restarting the timer
is the correct behavior, so the misleading "kill timer" log message
is updated accordingly.

Fixes: 1993b267dbcb ("net/bnxt: cleanup ULP parser and mapper")
Cc: stable@dpdk.org

Signed-off-by: Joey Zhong <xiaozhen.zhong@broadcom.com>
Signed-off-by: Manish Kurup <manish.kurup@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
index 7b7c10d360..d558f78c8c 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
@@ -256,8 +256,8 @@ ulp_ha_mgr_timer_cb(void *arg)
 	myclient_cnt = bnxt_ulp_cntxt_num_shared_clients_get(ulp_ctx);
 	if (myclient_cnt == 0) {
 		BNXT_DRV_DBG(ERR,
-			     "PANIC Client Count is zero kill timer\n.");
-		return;
+			     "Client Count is zero, skip and restart timer.\n");
+		goto cb_restart;
 	}
 
 	tfp = bnxt_ulp_cntxt_tfp_get(ulp_ctx, BNXT_ULP_SESSION_TYPE_SHARED_WC);
-- 
2.31.1


                 reply	other threads:[~2026-10-05 23:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261005235049.27024-1-manish.kurup@broadcom.com \
    --to=manish.kurup@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=kishore.padmanabha@broadcom.com \
    --cc=stable@dpdk.org \
    --cc=xiaozhen.zhong@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox