All of lore.kernel.org
 help / color / mirror / Atom feed
From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH v2 1/1] nvme-rdma: Fix memory leak during queue allocation
Date: Mon, 13 Nov 2017 21:31:37 +0200	[thread overview]
Message-ID: <9b3b8587-ae00-fff6-cf0d-7e02e091a143@grimberg.me> (raw)
In-Reply-To: <1510481554-28106-1-git-send-email-maxg@mellanox.com>

Hi Max,

>   out_destroy_qp:
> -	rdma_destroy_qp(queue->cm_id);
> +	ib_destroy_qp(queue->qp);

Why was this changed? Any specific reason?>

>   out_destroy_ib_cq:
>   	ib_free_cq(queue->ib_cq);
>   out_put_dev:
> @@ -546,6 +555,7 @@ static int nvme_rdma_alloc_queue(struct nvme_rdma_ctrl *ctrl,
>   
>   out_destroy_cm_id:
>   	rdma_destroy_id(queue->cm_id);
> +	nvme_rdma_destroy_queue_ib(queue);
>   	return ret;
>   }
>   
> @@ -563,8 +573,8 @@ static void nvme_rdma_free_queue(struct nvme_rdma_queue *queue)
>   	if (!test_and_clear_bit(NVME_RDMA_Q_ALLOCATED, &queue->flags))
>   		return;
>   
> -	nvme_rdma_destroy_queue_ib(queue);
>   	rdma_destroy_id(queue->cm_id);
> +	nvme_rdma_destroy_queue_ib(queue);

Why was this changed? What race are you preventing here?

  reply	other threads:[~2017-11-13 19:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-12 10:12 [PATCH v2 1/1] nvme-rdma: Fix memory leak during queue allocation Max Gurtovoy
2017-11-13 19:31 ` Sagi Grimberg [this message]
2017-11-14  8:57   ` Max Gurtovoy
2017-11-22 13:48     ` [Suspected-Phishing]Re: " Max Gurtovoy
2017-11-22 14:31       ` Sagi Grimberg

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=9b3b8587-ae00-fff6-cf0d-7e02e091a143@grimberg.me \
    --to=sagi@grimberg.me \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.