public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RDMA/efa: Fix possible deadlock
@ 2026-03-14  4:57 Ethan Tidmore
  2026-03-14  5:38 ` Ethan Tidmore
  2026-03-16 20:20 ` Leon Romanovsky
  0 siblings, 2 replies; 3+ messages in thread
From: Ethan Tidmore @ 2026-03-14  4:57 UTC (permalink / raw)
  To: Michael Margolin, Jason Gunthorpe, linux-rdma
  Cc: Leon Romanovsky, Gal Pressman, Yossi Leybovich, Daniel Kranzdorf,
	Yonatan Nachum, linux-kernel, Ethan Tidmore

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


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

end of thread, other threads:[~2026-03-16 20:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-14  4:57 [PATCH] RDMA/efa: Fix possible deadlock Ethan Tidmore
2026-03-14  5:38 ` Ethan Tidmore
2026-03-16 20:20 ` Leon Romanovsky

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