rdma/qedr: Fix crash due to redundant release of device's qp memory
authorPrabhakar Kushwaha <pkushwaha@marvell.com>
Tue, 19 Oct 2021 08:22:12 +0000 (11:22 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 19 Oct 2021 23:17:44 +0000 (20:17 -0300)
commit60fab1076636493cfa2686e712446595fe43bc16
tree3a89aa81b75345e259e33f8aafdd715dc3ff353d
parent663991f32857b3b63c94c97de9dbb0ec8600144f
rdma/qedr: Fix crash due to redundant release of device's qp memory

Device's QP memory should only be allocated and released by IB layer.
This patch removes the redundant release of the device's qp memory and
uses completion APIs to make sure that .destroy_qp() only return, when qp
reference becomes 0.

Fixes: 514aee660df4 ("RDMA: Globally allocate and release QP memory")
Link: https://lore.kernel.org/r/20211019082212.7052-1-pkushwaha@marvell.com
Acked-by: Michal Kalderon <michal.kalderon@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
Signed-off-by: Shai Malin <smalin@marvell.com>
Signed-off-by: Alok Prasad <palok@marvell.com>
Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/qedr/qedr.h
drivers/infiniband/hw/qedr/qedr_iw_cm.c
drivers/infiniband/hw/qedr/verbs.c