Re: [PATCH] RDMA/efa: Fix possible deadlock

From: Ethan Tidmore

Date: Sat Mar 14 2026 - 01:39:06 EST


On Fri Mar 13, 2026 at 11:57 PM CDT, Ethan Tidmore wrote:
> 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.

Detected by Smatch:
drivers/infiniband/hw/efa/efa_com.c:662 efa_com_cmd_exec() warn:
inconsistent returns '&aq->avail_cmds'

>
> Fixes: ef3b06742c8a2 ("RDMA/efa: Fix use of completion ctx after free")
> Signed-off-by: Ethan Tidmore <ethantidmore06@xxxxxxxxx>
> ---

Forgot to add the Smatch warning, if this version is good please add
this to the commit message.

Thanks,

ET