summaryrefslogtreecommitdiffstats
path: root/fs/proc/mmu.c
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2005-06-15 23:06:48 +0200
committerTony Luck <tony.luck@intel.com>2005-06-15 23:06:48 +0200
commitf2cbb4f01936a3e4225692e03b084b78c56d386d (patch)
treef89f3d8baa250589a38a4dd2df56f84cddae3c76 /fs/proc/mmu.c
parentMerge with temp tree to get David's gdb inferior calls patch (diff)
parent[PATCH] update ppc64 defconfig (diff)
downloadlinux-f2cbb4f01936a3e4225692e03b084b78c56d386d.tar.xz
linux-f2cbb4f01936a3e4225692e03b084b78c56d386d.zip
Auto merge with /home/aegl/GIT/linus
Diffstat (limited to 'fs/proc/mmu.c')
-rw-r--r--fs/proc/mmu.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/fs/proc/mmu.c b/fs/proc/mmu.c
index a7041038ad56..25d2d9c6e329 100644
--- a/fs/proc/mmu.c
+++ b/fs/proc/mmu.c
@@ -50,13 +50,23 @@ void get_vmalloc_info(struct vmalloc_info *vmi)
read_lock(&vmlist_lock);
for (vma = vmlist; vma; vma = vma->next) {
+ unsigned long addr = (unsigned long) vma->addr;
+
+ /*
+ * Some archs keep another range for modules in vmlist
+ */
+ if (addr < VMALLOC_START)
+ continue;
+ if (addr >= VMALLOC_END)
+ break;
+
vmi->used += vma->size;
- free_area_size = (unsigned long) vma->addr - prev_end;
+ free_area_size = addr - prev_end;
if (vmi->largest_chunk < free_area_size)
vmi->largest_chunk = free_area_size;
- prev_end = vma->size + (unsigned long) vma->addr;
+ prev_end = vma->size + addr;
}
if (VMALLOC_END - prev_end > vmi->largest_chunk)