[Devel] Subject: [PATCH RHEL9] fs/fuse kio: fix deadlock in establishing rdma connection
Alexey Kuznetsov
kuznet at acronis.com
Mon Aug 21 11:59:42 MSK 2023
Acknowledged
On Mon, Aug 21, 2023 at 2:57 PM Kui Liu <Kui.Liu at acronis.com> wrote:
>
> rdma_connect() now can't be called directly in cm event handler,
>
> as it will cause deadlock. Use rdma_connect_locked() instead
>
>
>
> https://pmc.acronis.work/browse/VSTOR-73616
>
>
>
> Signed-off-by: Liu Kui <Kui.Liu at acronis.com>
>
> ---
>
> fs/fuse/kio/pcs/pcs_rdma_conn.c | 4 ++--
>
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>
>
> diff --git a/fs/fuse/kio/pcs/pcs_rdma_conn.c b/fs/fuse/kio/pcs/pcs_rdma_conn.c
>
> index 616cd3b93e40..44b06a0aba52 100644
>
> --- a/fs/fuse/kio/pcs/pcs_rdma_conn.c
>
> +++ b/fs/fuse/kio/pcs/pcs_rdma_conn.c
>
> @@ -80,8 +80,8 @@ static int pcs_rdma_cm_event_handler(struct rdma_cm_id *cmid,
>
> rc->cmid = NULL;
>
>
>
> conn_param_init(&conn_param, &rc->rio->conn_req, cmid);
>
> - if (rdma_connect(cmid, &conn_param)) {
>
> - TRACE("rdma_connect failed: rio: 0x%p\n", rc->rio);
>
> + if (rdma_connect_locked(cmid, &conn_param)) {
>
> + TRACE("rdma_connect_locked failed: rio: 0x%p\n", rc->rio);
>
> complete(&rc->cm_done);
>
> }
>
> break;
>
> --
>
> 2.32.0 (Apple Git-132)
>
> _______________________________________________
> Devel mailing list
> Devel at openvz.org
> https://lists.openvz.org/mailman/listinfo/devel
More information about the Devel
mailing list