Commit 17748056 authored by Bryan Tan's avatar Bryan Tan Committed by Jason Gunthorpe

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: 29c8d9eb ("IB: Add vmw_pvrdma driver")
Reviewed-by: default avatarAdit Ranadive <aditr@vmware.com>
Reviewed-by: default avatarAditya Sarwade <asarwade@vmware.com>
Reviewed-by: default avatarJorgen Hansen <jhansen@vmware.com>
Signed-off-by: default avatarBryan Tan <bryantan@vmware.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent d1458733
......@@ -431,6 +431,13 @@ static void pvrdma_free_qp(struct pvrdma_qp *qp)
atomic_dec(&qp->refcnt);
wait_event(qp->wait, !atomic_read(&qp->refcnt));
if (!qp->is_kernel) {
if (qp->rumem)
ib_umem_release(qp->rumem);
if (qp->sumem)
ib_umem_release(qp->sumem);
}
pvrdma_page_dir_cleanup(dev, &qp->pdir);
kfree(qp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment