aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Tan <bryantan@vmware.com>2017-12-20 12:49:03 -0500
committerJason Gunthorpe <jgg@mellanox.com>2017-12-21 18:06:06 -0500
commit17748056ce123ee37fb7382bc698fc721e3c4a09 (patch)
tree9096a58055eb7db22c7bf370d9a79f767c8c973c
parentd14587334580bc94d3ee11e8320e0c157f91ae8f (diff)
RDMA/vmw_pvrdma: Call ib_umem_release on destroy QP path
The QP cleanup did not previously call ib_umem_release, resulting in a user-triggerable kernel resource leak. Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver") Reviewed-by: Adit Ranadive <aditr@vmware.com> Reviewed-by: Aditya Sarwade <asarwade@vmware.com> Reviewed-by: Jorgen Hansen <jhansen@vmware.com> Signed-off-by: Bryan Tan <bryantan@vmware.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
-rw-r--r--drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c
index 10420a18d02f..dceebc623d96 100644
--- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c
+++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c
@@ -431,6 +431,13 @@ static void pvrdma_free_qp(struct pvrdma_qp *qp)
431 atomic_dec(&qp->refcnt); 431 atomic_dec(&qp->refcnt);
432 wait_event(qp->wait, !atomic_read(&qp->refcnt)); 432 wait_event(qp->wait, !atomic_read(&qp->refcnt));
433 433
434 if (!qp->is_kernel) {
435 if (qp->rumem)
436 ib_umem_release(qp->rumem);
437 if (qp->sumem)
438 ib_umem_release(qp->sumem);
439 }
440
434 pvrdma_page_dir_cleanup(dev, &qp->pdir); 441 pvrdma_page_dir_cleanup(dev, &qp->pdir);
435 442
436 kfree(qp); 443 kfree(qp);