aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c
diff options
context:
space:
mode:
authorShamir Rabinovitch <shamir.rabinovitch@oracle.com>2019-03-31 12:10:05 -0400
committerJason Gunthorpe <jgg@mellanox.com>2019-04-01 13:57:35 -0400
commitc4367a26357be501338e41ceae7ebb7ce57064e5 (patch)
tree077a31d263a3a9a27d401601b45f477bb3f4967f /drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c
parenta6a3797df2741aa81f33fe48f609247dba98f3f7 (diff)
IB: Pass uverbs_attr_bundle down ib_x destroy path
The uverbs_attr_bundle with the ucontext is sent down to the drivers ib_x destroy path as ib_udata. The next patch will use the ib_udata to free the drivers destroy path from the dependency in 'uobject->context' as we already did for the create path. Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c')
-rw-r--r--drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c
index 8a32e1e435a9..19ff6004b477 100644
--- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c
+++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c
@@ -460,7 +460,7 @@ int pvrdma_alloc_pd(struct ib_pd *ibpd, struct ib_ucontext *context,
460 if (ib_copy_to_udata(udata, &pd_resp, sizeof(pd_resp))) { 460 if (ib_copy_to_udata(udata, &pd_resp, sizeof(pd_resp))) {
461 dev_warn(&dev->pdev->dev, 461 dev_warn(&dev->pdev->dev,
462 "failed to copy back protection domain\n"); 462 "failed to copy back protection domain\n");
463 pvrdma_dealloc_pd(&pd->ibpd); 463 pvrdma_dealloc_pd(&pd->ibpd, udata);
464 return -EFAULT; 464 return -EFAULT;
465 } 465 }
466 } 466 }
@@ -476,10 +476,11 @@ err:
476/** 476/**
477 * pvrdma_dealloc_pd - deallocate protection domain 477 * pvrdma_dealloc_pd - deallocate protection domain
478 * @pd: the protection domain to be released 478 * @pd: the protection domain to be released
479 * @udata: user data or null for kernel object
479 * 480 *
480 * @return: 0 on success, otherwise errno. 481 * @return: 0 on success, otherwise errno.
481 */ 482 */
482void pvrdma_dealloc_pd(struct ib_pd *pd) 483void pvrdma_dealloc_pd(struct ib_pd *pd, struct ib_udata *udata)
483{ 484{
484 struct pvrdma_dev *dev = to_vdev(pd->device); 485 struct pvrdma_dev *dev = to_vdev(pd->device);
485 union pvrdma_cmd_req req = {}; 486 union pvrdma_cmd_req req = {};
@@ -556,7 +557,7 @@ struct ib_ah *pvrdma_create_ah(struct ib_pd *pd, struct rdma_ah_attr *ah_attr,
556 * 557 *
557 * @return: 0 on success. 558 * @return: 0 on success.
558 */ 559 */
559int pvrdma_destroy_ah(struct ib_ah *ah, u32 flags) 560int pvrdma_destroy_ah(struct ib_ah *ah, u32 flags, struct ib_udata *udata)
560{ 561{
561 struct pvrdma_dev *dev = to_vdev(ah->device); 562 struct pvrdma_dev *dev = to_vdev(ah->device);
562 563