[ewg] [PATCH] RDMA/ucma.c: Fix for ucma context uid=0, causing iWarp RDMA applications to fail in connection establishment
Tatyana Nikolova
Tatyana.E.Nikolova at intel.com
Thu Aug 2 17:32:24 PDT 2012
Fix for ucma context uid=0, causing iWarp RDMA applications to fail in connection establishment.
If the context uid is not set before calling rdma_accept(), the RDMA_CM_EVENT_ESTABLISHED event generated asynchronously by successfull rdma_accept ends up with zero ucma context uid, resulting in segfault at librdmacm.so
Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova at intel.com>
---
drivers/infiniband/core/ucma.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c
index 8002ae6..6cc40de 100644
--- a/drivers/infiniband/core/ucma.c
+++ b/drivers/infiniband/core/ucma.c
@@ -803,9 +803,8 @@ static ssize_t ucma_accept(struct ucma_file *file, const char __user *inbuf,
if (cmd.conn_param.valid) {
ucma_copy_conn_param(&conn_param, &cmd.conn_param);
mutex_lock(&file->mut);
+ ctx->uid = cmd.uid;
ret = rdma_accept(ctx->cm_id, &conn_param);
- if (!ret)
- ctx->uid = cmd.uid;
mutex_unlock(&file->mut);
} else
ret = rdma_accept(ctx->cm_id, NULL);
--
1.7.4.2
More information about the ewg
mailing list