The patch titled Fix /proc/pid/pagemap end address calculation has been added to the -mm tree. Its filename is maps2-add-proc-pid-pagemap-interface-fix-proc-pid-pagemap-end-address-calculation.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: Fix /proc/pid/pagemap end address calculation From: boutcher@xxxxxxxxxx (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 <boutcher@xxxxxxxxxx> Acked-by: Matt Mackall <mpm@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- 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; _ Patches currently in -mm which might be from boutcher@xxxxxxxxxx are maps2-add-proc-pid-pagemap-interface-fix-proc-pid-pagemap-return-length-calculation.patch maps2-add-proc-pid-pagemap-interface-fix-proc-pid-pagemap-end-address-calculation.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html