[openib-general] [PATCH 3/5] Clean up pending mmaps on ucontext deallocation.
Steve Wise
swise at opengridcomputing.com
Thu Feb 8 12:26:40 PST 2007
From: Steve Wise <swise at opengridcomputing.com>
Free all pending mmap structs when the ucontext is deallocated.
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 db2b0a8..85484ac 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