patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/bnxt: fix deadlock in mgr timer cb
@ 2023-11-04  4:06 Weiguo Li
  2024-02-08 21:45 ` Ajit Khaparde
  0 siblings, 1 reply; 2+ messages in thread
From: Weiguo Li @ 2023-11-04  4:06 UTC (permalink / raw)
  To: ajit.khaparde, sbhosle
  Cc: michael.baucom, kishore.padmanabha, venkatkumar.duvvuru, dev,
	stable, Weiguo Li

The function 'ulp_ha_mgr_timer_cb' acquires a lock on the context
entry at the beginning with bnxt_ulp_cntxt_entry_acquire(). This lock
is expected to be released by bnxt_ulp_cntxt_entry_release() at the
end of the function.

However, the second early return statement in the function could
potentially bypass the lock release. To fix this issue, add
bnxt_ulp_cntxt_entry_release() before the return statement.

Fixes: 1993b267dbcb ("net/bnxt: cleanup ULP parser and mapper)

Signed-off-by: Weiguo Li <>
 drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
index f3f5bda890..852deef3b4 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
@@ -253,6 +253,7 @@ ulp_ha_mgr_timer_cb(void *arg)
 	myclient_cnt = bnxt_ulp_cntxt_num_shared_clients_get(ulp_ctx);
 	if (myclient_cnt == 0) {
+		bnxt_ulp_cntxt_entry_release();
 			    "PANIC Client Count is zero kill timer\n.");

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

end of thread, other threads:[~2024-02-08 21:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-04  4:06 [PATCH] net/bnxt: fix deadlock in mgr timer cb Weiguo Li
2024-02-08 21:45 ` Ajit Khaparde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).