All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Kalderon <michal.kalderon@marvell.com>
To: <michal.kalderon@marvell.com>, <aelior@marvell.com>,
	<dledford@redhat.com>, <jgg@ziepe.ca>
Cc: <linux-rdma@vger.kernel.org>
Subject: [PATCH v2 rdma-next 0/2] RDMA/qedr: Fix memory leaks and synchronization
Date: Wed, 16 Oct 2019 14:42:40 +0300	[thread overview]
Message-ID: <20191016114242.10736-1-michal.kalderon@marvell.com> (raw)

Several leaks and issues were found when running iWARP with kmemleak.
some apply to RoCE as well.

This series fixes some memory leaks and some wrong methods of
synchronization which were used to wait for iWARP CM related events.

Changes from v1
---------------
- When removing the qp from the xarray xa_erase should be used and
  not xa_erase_irq as this can't be called from irq context.

- Add xa_lock around loading a qp from the xarray and increase the
  refcnt only under the xa_lock and only if not zero. This is to make
  qedr more robust and not rely on the core/iwcm implementation to
  assure correctness.

- Complete the iwarp_cm_comp event only if the bit was turned on and
  the destroy qp flow will attempt to look at the completion.

Michal Kalderon (2):
  RDMA/qedr: Fix synchronization methods and memory leaks in qedr
  RDMA/qedr: Fix memory leak in user qp and mr

 drivers/infiniband/hw/qedr/qedr.h       |  23 ++++-
 drivers/infiniband/hw/qedr/qedr_iw_cm.c | 150 ++++++++++++++++++++++----------
 drivers/infiniband/hw/qedr/verbs.c      |  54 +++++++-----
 3 files changed, 151 insertions(+), 76 deletions(-)

-- 
2.14.5


             reply	other threads:[~2019-10-16 11:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 11:42 Michal Kalderon [this message]
2019-10-16 11:42 ` [PATCH v2 rdma-next 1/2] RDMA/qedr: Fix synchronization methods and memory leaks in qedr Michal Kalderon
2019-10-22 19:36   ` Jason Gunthorpe
2019-10-23  9:49     ` [EXT] " Michal Kalderon
2019-10-23 14:43       ` Jason Gunthorpe
2019-10-24 12:19       ` Michal Kalderon
2019-10-16 11:42 ` [PATCH v2 rdma-next 2/2] RDMA/qedr: Fix memory leak in user qp and mr Michal Kalderon
2019-10-22 19:36   ` 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=20191016114242.10736-1-michal.kalderon@marvell.com \
    --to=michal.kalderon@marvell.com \
    --cc=aelior@marvell.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-rdma@vger.kernel.org \
    /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.