ignore this - there are 2 locks being used in ucma_create_id
I will resubmit
> diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c
> index ca12acf..fd6b980 100644
> --- a/drivers/infiniband/core/ucma.c
> +++ b/drivers/infiniband/core/ucma.c
> @@ -384,31 +384,32 @@ static ssize_t ucma_create_id(struct ucma_file *file,
>
> mutex_lock(&file->mut);
> ctx = ucma_alloc_ctx(file);
> - mutex_unlock(&file->mut);
> - if (!ctx)
> + if (!ctx) {
> + mutex_unlock(&file->mut);
> return -ENOMEM;
> + }
>
> ctx->uid = cmd.uid;
> ctx->cm_id = rdma_create_id(ucma_event_handler, ctx, cmd.ps);
> if (IS_ERR(ctx->cm_id)) {
> ret = PTR_ERR(ctx->cm_id);
> - goto err1;
> + goto err;
> }
>
> resp.id = ctx->id;
> if (copy_to_user((void __user *)(unsigned long)cmd.response,
> &resp, sizeof(resp))) {
> ret = -EFAULT;
> - goto err2;
> + goto err;
> }
> + mutex_unlock(&file->mut);
> return 0;
>
> -err2:
> - rdma_destroy_id(ctx->cm_id);
> -err1:
> - mutex_lock(&mut);
> +err:
> idr_remove(&ctx_idr, ctx->id);
> mutex_unlock(&mut);
> + if (!IS_ERR(ctx->cm_id))
> + rdma_destroy_id(ctx->cm_id);
> kfree(ctx);
> return ret;
> }
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html