aboutsummaryrefslogtreecommitdiff
path: root/fs/proc/mmu.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-19 11:54:00 +0100
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-19 11:54:00 +0100
commit7063e6c717f6108c4b3fc3135a516c86ef944870 (patch)
treeec6eec10b4dc93474100e6e366df028bd3314fda /fs/proc/mmu.c
parent7ca0026495dbb644b4e32ede76be44072cb2bc7a (diff)
parent05d3794aa8bd3b2c9f7920a05003c331cdeb75c5 (diff)
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
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 a7041038ad5..25d2d9c6e32 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)