From: Dave Boutcher When dumping vma information the pagemap_read routine calculates the minimum of what the user asks for and the end of the vma. Unfortunately the code uses vma->vm_start rather than vma->vm_end which can result in the end address being before the start, and a nasty never-ending loop in the kernel. Signed-off-by: Dave Boutcher Acked-by: Matt Mackall Signed-off-by: Andrew Morton --- fs/proc/task_mmu.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN fs/proc/task_mmu.c~maps2-add-proc-pid-pagemap-interface-fix-proc-pid-pagemap-end-address-calculation fs/proc/task_mmu.c --- a/fs/proc/task_mmu.c~maps2-add-proc-pid-pagemap-interface-fix-proc-pid-pagemap-end-address-calculation +++ a/fs/proc/task_mmu.c @@ -703,7 +703,7 @@ static ssize_t pagemap_read(struct file ret = -EIO; goto out_mm; } - vend = min(vma->vm_start - 1, end - 1) + 1; + vend = min(vma->vm_end - 1, end - 1) + 1; ret = pagemap_fill(&pm, vend); if (ret || !pm.count) break; _