[Devel] Subject: [PATCH RHEL9] fs/fuse kio: fix deadlock in establishing rdma connection

Kui Liu Kui.Liu at acronis.com
Mon Aug 21 09:55:48 MSK 2023


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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/devel/attachments/20230821/5cd1f06c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fs-fuse-kio-fix-deadlock-in-establishing-rdma-connec.patch
Type: application/octet-stream
Size: 1187 bytes
Desc: 0001-fs-fuse-kio-fix-deadlock-in-establishing-rdma-connec.patch
URL: <http://lists.openvz.org/pipermail/devel/attachments/20230821/5cd1f06c/attachment.obj>


More information about the Devel mailing list