[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1201688708-2152-1-git-send-email-bryan.wu@analog.com>
Date: Wed, 30 Jan 2008 18:25:08 +0800
From: Bryan Wu <bryan.wu@...log.com>
To: linux-kernel@...r.kernel.org
Cc: Bernd Schmidt <bernd.schmidt@...log.com>,
Bryan Wu <bryan.wu@...log.com>
Subject: [PATCH 1/1] [NOMMU]: Dont use kobjsize on the area belonging to a VMA
From: Bernd Schmidt <bernd.schmidt@...log.com>
Dont use kobjsize on the area belonging to a VMA, as it's allocated with
get_free_pages.
Signed-off-by: Bernd Schmidt <bernd.schmidt@...log.com>
Signed-off-by: Bryan Wu <bryan.wu@...log.com>
---
fs/proc/task_nommu.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
index 1932c2c..1d0513e 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -76,7 +76,7 @@ unsigned long task_vsize(struct mm_struct *mm)
down_read(&mm->mmap_sem);
for (tbp = mm->context.vmlist; tbp; tbp = tbp->next) {
if (tbp->vma)
- vsize += kobjsize((void *) tbp->vma->vm_start);
+ vsize += tbp->vma->vm_end - tbp->vma->vm_start;
}
up_read(&mm->mmap_sem);
return vsize;
@@ -93,7 +93,7 @@ int task_statm(struct mm_struct *mm, int *shared, int *text,
size += kobjsize(tbp);
if (tbp->vma) {
size += kobjsize(tbp->vma);
- size += kobjsize((void *) tbp->vma->vm_start);
+ size += tbp->vma->vm_end - tbp->vma->vm_start;
}
}
--
1.5.3.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists