From: Ethan Tidmore <ethantidmore06@gmail.com>
To: Michael Margolin <mrgolin@amazon.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
linux-rdma@vger.kernel.org
Cc: Leon Romanovsky <leon@kernel.org>,
Gal Pressman <gal.pressman@linux.dev>,
Yossi Leybovich <sleybo@amazon.com>,
Daniel Kranzdorf <dkkranzd@amazon.com>,
Yonatan Nachum <ynachum@amazon.com>,
linux-kernel@vger.kernel.org,
Ethan Tidmore <ethantidmore06@gmail.com>
Subject: [PATCH] RDMA/efa: Fix possible deadlock
Date: Fri, 13 Mar 2026 23:57:30 -0500 [thread overview]
Message-ID: <20260314045730.1143862-1-ethantidmore06@gmail.com> (raw)
In the error path for efa_com_alloc_comp_ctx() the lock assigned to
&aq->avail_cmds is not released.
Add release for &aq->avail_cmds in efa_com_alloc_comp_ctx() error path.
Fixes: ef3b06742c8a2 ("RDMA/efa: Fix use of completion ctx after free")
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
---
drivers/infiniband/hw/efa/efa_com.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/infiniband/hw/efa/efa_com.c b/drivers/infiniband/hw/efa/efa_com.c
index 56caba612139..e97b5f0d7003 100644
--- a/drivers/infiniband/hw/efa/efa_com.c
+++ b/drivers/infiniband/hw/efa/efa_com.c
@@ -629,6 +629,7 @@ int efa_com_cmd_exec(struct efa_com_admin_queue *aq,
comp_ctx = efa_com_alloc_comp_ctx(aq);
if (!comp_ctx) {
clear_bit(EFA_AQ_STATE_RUNNING_BIT, &aq->state);
+ up(&aq->avail_cmds);
return -EINVAL;
}
--
2.53.0
next reply other threads:[~2026-03-14 4:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-14 4:57 Ethan Tidmore [this message]
2026-03-14 5:38 ` Ethan Tidmore
2026-03-16 20:20 ` Leon Romanovsky
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=20260314045730.1143862-1-ethantidmore06@gmail.com \
--to=ethantidmore06@gmail.com \
--cc=dkkranzd@amazon.com \
--cc=gal.pressman@linux.dev \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mrgolin@amazon.com \
--cc=sleybo@amazon.com \
--cc=ynachum@amazon.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
all inboxes | Powered by JetHome®