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 V2 --------------- - Add a new separate patch that fixes the xarray api that was used for the qps xarray, there was no need to use the _irq version of the api. - Move xa_erase of qp_id to be right before the qp resources are released. This fixes a race where the qp-id can be reassigned before removed from the xarray. - Modify places that call kref_get_unless_zero to kref_get since we already hold a valid pointer. - Comment about the usage of the same completion structure for two different completions. - Add Fixes tag 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 (3): RDMA/qedr: Fix qpids xarray api used RDMA/qedr: Fix synchronization methods and memory leaks in qedr RDMA/qedr: Fix memory leak in user qp and mr drivers/infiniband/hw/qedr/main.c | 1 - drivers/infiniband/hw/qedr/qedr.h | 23 ++++- drivers/infiniband/hw/qedr/qedr_iw_cm.c | 148 +++++++++++++++++++++----------- drivers/infiniband/hw/qedr/verbs.c | 76 ++++++++++------ 4 files changed, 169 insertions(+), 79 deletions(-) -- 2.14.5