[ewg] [PATCH] RDMA/ucma.c: Different fix for ucma context uid=0, causing iWarp RDMA applications to fail in connection establishment

Vladimir Sokolovsky vlad at dev.mellanox.co.il
Wed Aug 8 08:59:52 PDT 2012


On 08/08/2012 08:10 AM, Nikolova, Tatyana E wrote:
> Vlad,
>
> This is the fix for http://bugs.openfabrics.org/bugzilla/show_bug.cgi?id=2367
>
> Could you apply the patch to OFED-3.5 daily build? Without the fix we cannot test the NES driver with OFED-3.5-RC1.
>
> Thank you,
> Tatyana

Hi Tatyana,
I added this patch to the linux-next-cherry-picks directory (compat-rdma git tree)

Please test in:
http://www.openfabrics.org/downloads/OFED/ofed-3.5-daily/OFED-3.5-20120808-0847.tgz

Regards,
Vladimir

>
> -----Original Message-----
> From: ewg-bounces at lists.openfabrics.org [mailto:ewg-bounces at lists.openfabrics.org] On Behalf Of Tatyana Nikolova
> Sent: Tuesday, August 07, 2012 5:47 PM
> To: vlad at dev.mellanox.co.il
> Cc: ewg at lists.openfabrics.org
> Subject: [ewg] [PATCH] RDMA/ucma.c: Different fix for ucma context uid=0, causing iWarp RDMA applications to fail in connection establishment
>
> Fix for ucma context uid=0, causing iWarp RDMA applications to fail in connection establishment.
>
> This is a new patch addressing the librdmacm segfault when RDMA_CM_EVENT_ESTABLISHED event shows up with evt->id_priv = NULL
> In the ucma_event_handler(), ctx->file->mut is moved up to prevent race conditions and protect from assigning zero ucma ctx->uid to asynchronously generated events.
>
> Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova at intel.com>
> Signed-off-by: Sean Hefty <Sean.Hefty at intel.com>
> ---
>   drivers/infiniband/core/ucma.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c
> index 8002ae6..88c50d2 100644
> --- a/drivers/infiniband/core/ucma.c
> +++ b/drivers/infiniband/core/ucma.c
> @@ -267,6 +267,7 @@ static int ucma_event_handler(struct rdma_cm_id *cm_id,
>   	if (!uevent)
>   		return event->event == RDMA_CM_EVENT_CONNECT_REQUEST;
>
> +	mutex_lock(&ctx->file->mut);
>   	uevent->cm_id = cm_id;
>   	ucma_set_event_context(ctx, event, uevent);
>   	uevent->resp.event = event->event;
> @@ -277,7 +278,6 @@ static int ucma_event_handler(struct rdma_cm_id *cm_id,
>   		ucma_copy_conn_event(&uevent->resp.param.conn,
>   				     &event->param.conn);
>
> -	mutex_lock(&ctx->file->mut);
>   	if (event->event == RDMA_CM_EVENT_CONNECT_REQUEST) {
>   		if (!ctx->backlog) {
>   			ret = -ENOMEM;
>



More information about the ewg mailing list