From: Weiguo Li <liwg06@foxmail.com>
To: ajit.khaparde@broadcom.com, sbhosle@broadcom.com
Cc: michael.baucom@broadcom.com, kishore.padmanabha@broadcom.com,
venkatkumar.duvvuru@broadcom.com, dev@dpdk.org, stable@dpdk.org,
Weiguo Li <liweiguo@xencore.cn>
Subject: [PATCH] net/bnxt: fix deadlock in mgr timer cb
Date: Sat, 4 Nov 2023 12:06:58 +0800 [thread overview]
Message-ID: <tencent_7B6D2301220A31DB3CA9A701112E3A47DF08@qq.com> (raw)
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)
CC: stable@dpdk.org
Signed-off-by: Weiguo Li <liweiguo@xencore.cn>
---
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();
BNXT_TF_DBG(ERR,
"PANIC Client Count is zero kill timer\n.");
return;
--
2.34.1
next reply other threads:[~2023-11-04 4:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-04 4:06 Weiguo Li [this message]
2024-02-08 21:45 ` Ajit Khaparde
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=tencent_7B6D2301220A31DB3CA9A701112E3A47DF08@qq.com \
--to=liwg06@foxmail.com \
--cc=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=kishore.padmanabha@broadcom.com \
--cc=liweiguo@xencore.cn \
--cc=michael.baucom@broadcom.com \
--cc=sbhosle@broadcom.com \
--cc=stable@dpdk.org \
--cc=venkatkumar.duvvuru@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;
as well as URLs for NNTP newsgroup(s).