aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/cm.c
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-06-19 10:59:14 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-06-25 14:19:56 -0600
commitb7403217656dcf6c51f09d0bca7a12db0de8934a (patch)
tree7b33cae5ff1d69441813710a23498bbb606e13cf /drivers/infiniband/core/cm.c
parentIB/hfi1: Remove INTx support and simplify MSIx usage (diff)
downloadlinux-dev-b7403217656dcf6c51f09d0bca7a12db0de8934a.tar.xz
linux-dev-b7403217656dcf6c51f09d0bca7a12db0de8934a.zip
IB: Make ib_init_ah_attr_from_wc set sgid_attr
The work completion is inspected to determine what dgid table entry was used to receieve the packet, produces a sgid_attr that matches and sticks it in the ah_attr. All callers of this function are now required to release the ah_attr on success. Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/cm.c')
-rw-r--r--drivers/infiniband/core/cm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index 0f39a879c91d..11b85933fb39 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -1091,6 +1091,9 @@ retest:
wait_for_completion(&cm_id_priv->comp);
while ((work = cm_dequeue_work(cm_id_priv)) != NULL)
cm_free_work(work);
+
+ rdma_destroy_ah_attr(&cm_id_priv->av.ah_attr);
+ rdma_destroy_ah_attr(&cm_id_priv->alt_av.ah_attr);
kfree(cm_id_priv->private_data);
kfree(cm_id_priv);
}