linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Max Gurtovoy <maxg@mellanox.com>
To: Leon Romanovsky <leon@kernel.org>,
	Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@mellanox.com>
Cc: Leon Romanovsky <leonro@mellanox.com>,
	linux-rdma@vger.kernel.org, Saeed Mahameed <saeedm@mellanox.com>,
	Sagi Grimberg <sagi@grimberg.me>,
	Yamin Friedman <yaminf@mellanox.com>
Subject: Re: [PATCH rdma-rc 3/3] RDMA/core: Free DIM memory in error unwind
Date: Thu, 30 Jul 2020 12:30:32 +0300	[thread overview]
Message-ID: <331a2b75-87e7-b53b-191c-63cbb0617a29@mellanox.com> (raw)
In-Reply-To: <20200730082719.1582397-4-leon@kernel.org>


On 7/30/2020 11:27 AM, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@mellanox.com>
>
> The memory allocated for the DIM wasn't freed in in error unwind path,
> fix it by calling to rdma_dim_destroy().
>
> Fixes: da6629793aa6 ("RDMA/core: Provide RDMA DIM support for ULPs")
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> ---
>   drivers/infiniband/core/cq.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/infiniband/core/cq.c b/drivers/infiniband/core/cq.c
> index 33759b39c3d3..513825e424bf 100644
> --- a/drivers/infiniband/core/cq.c
> +++ b/drivers/infiniband/core/cq.c
> @@ -275,6 +275,7 @@ struct ib_cq *__ib_alloc_cq_user(struct ib_device *dev, void *private,
>   	return cq;
>   
>   out_destroy_cq:
> +	rdma_dim_destroy(cq);
>   	rdma_restrack_del(&cq->res);
>   	cq->device->ops.destroy_cq(cq, udata);
>   out_free_wc:

Looks good,

Reviewed-by: Max Gurtovoy <maxg@mellanox.com <mailto:maxg@mellanox.com>>


  reply	other threads:[~2020-07-30  9:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30  8:27 [PATCH rdma-rc 0/3] Simple fixes to DIM and mlx5 Leon Romanovsky
2020-07-30  8:27 ` [PATCH rdma-rc 1/3] RDMA/mlx5: Initialize QP mutex for the debug kernels Leon Romanovsky
2020-07-30  8:27 ` [PATCH rdma-rc 2/3] RDMA/core: Stop DIM before destroying CQ Leon Romanovsky
2020-07-30  8:27 ` [PATCH rdma-rc 3/3] RDMA/core: Free DIM memory in error unwind Leon Romanovsky
2020-07-30  9:30   ` Max Gurtovoy [this message]
2020-07-30 14:13 ` [PATCH rdma-rc 0/3] Simple fixes to DIM and mlx5 Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=331a2b75-87e7-b53b-191c-63cbb0617a29@mellanox.com \
    --to=maxg@mellanox.com \
    --cc=dledford@redhat.com \
    --cc=jgg@mellanox.com \
    --cc=leon@kernel.org \
    --cc=leonro@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=sagi@grimberg.me \
    --cc=yaminf@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).