mbox series

[v2,rdma-next,0/2] RDMA/qedr: Fix memory leaks and synchronization

Message ID 20191016114242.10736-1-michal.kalderon@marvell.com (mailing list archive)
Headers show
Series RDMA/qedr: Fix memory leaks and synchronization | expand

Message

Michal Kalderon Oct. 16, 2019, 11:42 a.m. UTC
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(-)