diff options
author | Prabhakar Kushwaha <pkushwaha@marvell.com> | 2021-10-19 11:22:12 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-10-19 20:17:44 -0300 |
commit | 60fab1076636493cfa2686e712446595fe43bc16 (patch) | |
tree | 3a89aa81b75345e259e33f8aafdd715dc3ff353d /drivers/infiniband/hw/qedr/qedr.h | |
parent | RDMA/rdmavt: Fix error code in rvt_create_qp() (diff) | |
download | linux-dev-60fab1076636493cfa2686e712446595fe43bc16.tar.xz linux-dev-60fab1076636493cfa2686e712446595fe43bc16.zip |
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>
Diffstat (limited to 'drivers/infiniband/hw/qedr/qedr.h')
-rw-r--r-- | drivers/infiniband/hw/qedr/qedr.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/qedr/qedr.h b/drivers/infiniband/hw/qedr/qedr.h index 3cb4febaad0f..8def88cfa300 100644 --- a/drivers/infiniband/hw/qedr/qedr.h +++ b/drivers/infiniband/hw/qedr/qedr.h @@ -455,6 +455,7 @@ struct qedr_qp { /* synchronization objects used with iwarp ep */ struct kref refcnt; struct completion iwarp_cm_comp; + struct completion qp_rel_comp; unsigned long iwarp_cm_flags; /* enum iwarp_cm_flags */ }; |