[openib-general] [PATCH] ofed_1_2/iw_cxgb3 - Free any pending mmaps in iwch_dealloc_ucontext().

Steve Wise swise at opengridcomputing.com
Tue Feb 13 12:10:01 PST 2007


Vlad/Michael,  

This should be pushed into ofed_1_2.  It can wait until after alpha1,
however, if you want.

Steve.

-----


Free any pending mmaps in iwch_dealloc_ucontext().

Signed-off-by: Steve Wise <swise at opengridcomputing.com>

---

 drivers/infiniband/hw/cxgb3/iwch_provider.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c
index dbb3f71..4a46771 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_provider.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c
@@ -98,7 +98,11 @@ static int iwch_dealloc_ucontext(struct 
 {
 	struct iwch_dev *rhp = to_iwch_dev(context->device);
 	struct iwch_ucontext *ucontext = to_iwch_ucontext(context);
+	struct iwch_mm_entry *mm, *tmp;
+
 	PDBG("%s context %p\n", __FUNCTION__, context);
+	list_for_each_entry_safe(mm, tmp, &ucontext->mmaps, entry)
+		kfree(mm);
 	cxio_release_ucontext(&rhp->rdev, &ucontext->uctx);
 	kfree(ucontext);
 	return 0;





More information about the general mailing list