The patch titled mm/nommu.c: fix remap_pfn_range() has been added to the -mm tree. Its filename is mm-nommuc-fix-remap_pfn_range.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: mm/nommu.c: fix remap_pfn_range() From: Bob Liu <lliubbo@xxxxxxxxx> remap_pfn_range() does not update vma->end on no mmu arch which will cause munmap() fail because it can't match the vma. eg. fb_mmap() in fbmem.c will call io_remap_pfn_range() which is remap_pfn_range() on nommu arch, if an address is not page aligned vma->start will be changed in remap_pfn_range(), but neither size nor vma->end will be updated. Then munmap(start, len) can't find the vma to free, because it need to compare (start + len) with vma->end. Signed-off-by: Bob Liu <lliubbo@xxxxxxxxx> Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Cc: David Howells <dhowells@xxxxxxxxxx> Cc: Greg Ungerer <gerg@xxxxxxxxxxx> Cc: Mike Frysinger <vapier@xxxxxxxxxx> Cc: Bob Liu <lliubbo@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/nommu.c | 1 + 1 file changed, 1 insertion(+) diff -puN mm/nommu.c~mm-nommuc-fix-remap_pfn_range mm/nommu.c --- a/mm/nommu.c~mm-nommuc-fix-remap_pfn_range +++ a/mm/nommu.c @@ -1817,6 +1817,7 @@ int remap_pfn_range(struct vm_area_struc unsigned long to, unsigned long size, pgprot_t prot) { vma->vm_start = vma->vm_pgoff << PAGE_SHIFT; + vma->vm_end = vma->vm_start + size; return 0; } EXPORT_SYMBOL(remap_pfn_range); _ Patches currently in -mm which might be from lliubbo@xxxxxxxxx are origin.patch mm-nommuc-fix-remap_pfn_range.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