All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "RDMA/vmw_pvrdma: Call ib_umem_release on destroy QP path" has been added to the 4.14-stable tree
@ 2018-02-28 15:27 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-02-28 15:27 UTC (permalink / raw)
  To: bryantan, aditr, alexander.levin, asarwade, gregkh, jgg, jhansen
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    RDMA/vmw_pvrdma: Call ib_umem_release on destroy QP path

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rdma-vmw_pvrdma-call-ib_umem_release-on-destroy-qp-path.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Wed Feb 28 16:23:28 CET 2018
From: Bryan Tan <bryantan@vmware.com>
Date: Wed, 20 Dec 2017 09:49:03 -0800
Subject: RDMA/vmw_pvrdma: Call ib_umem_release on destroy QP path

From: Bryan Tan <bryantan@vmware.com>


[ Upstream commit 17748056ce123ee37fb7382bc698fc721e3c4a09 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c
+++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c
@@ -406,6 +406,13 @@ static void pvrdma_free_qp(struct pvrdma
 	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);


Patches currently in stable-queue which might be from bryantan@vmware.com are

queue-4.14/rdma-vmw_pvrdma-call-ib_umem_release-on-destroy-qp-path.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-28 15:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-28 15:27 Patch "RDMA/vmw_pvrdma: Call ib_umem_release on destroy QP path" has been added to the 4.14-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.