提交 17748056 编写于 作者: B Bryan Tan 提交者: 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: NAdit Ranadive <aditr@vmware.com>
Reviewed-by: NAditya Sarwade <asarwade@vmware.com>
Reviewed-by: NJorgen Hansen <jhansen@vmware.com>
Signed-off-by: NBryan Tan <bryantan@vmware.com>
Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
上级 d1458733
...@@ -431,6 +431,13 @@ static void pvrdma_free_qp(struct pvrdma_qp *qp) ...@@ -431,6 +431,13 @@ static void pvrdma_free_qp(struct pvrdma_qp *qp)
atomic_dec(&qp->refcnt); atomic_dec(&qp->refcnt);
wait_event(qp->wait, !atomic_read(&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); pvrdma_page_dir_cleanup(dev, &qp->pdir);
kfree(qp); kfree(qp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册