The patch titled fix bogon in /dev/mem mmap'ing on nommu has been added to the -mm tree. Its filename is fix-bogon-in-dev-mem-mmaping-on-nommu.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 bogon in /dev/mem mmap'ing on nommu From: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> While digging through my MAP_FIXED changes, I found that rather obvious bug in /dev/mem mmap implementation for nommu archs. get_unmapped_area() is expected to return an address, not a pfn. Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Acked-By: David Howells <dhowells@xxxxxxxxxx> Cc: <stable@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/char/mem.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/char/mem.c~fix-bogon-in-dev-mem-mmaping-on-nommu drivers/char/mem.c --- a/drivers/char/mem.c~fix-bogon-in-dev-mem-mmaping-on-nommu +++ a/drivers/char/mem.c @@ -247,7 +247,7 @@ static unsigned long get_unmapped_area_m { if (!valid_mmap_phys_addr_range(pgoff, len)) return (unsigned long) -EINVAL; - return pgoff; + return pgoff << PAGE_SHIFT; } /* can't do an in-place private mapping if there's no MMU */ _ Patches currently in -mm which might be from benh@xxxxxxxxxxxxxxxxxxx are allow-vmsplice-to-work-in-32-bit-mode-on-ppc64.patch fix-bogon-in-dev-mem-mmaping-on-nommu.patch git-powerpc.patch git-powerpc-arch-powerpc-sysdev-timerc-build-fix.patch ppc4xx_sgdma-needs-dma_mappingh.patch powerpc-rtas-msi-support.patch remove-unused-header-file-arch-ppc-syslib-cpc710h.patch remove-unused-header-file-arch-powerpc-platforms-83xx-mpc834x_itxh.patch powerpc-fix-breakage-caused-by-72486f1f8f0a2bc828b9d30cf4690cf2dd6807fc.patch ocotea-board-ntpd-complains-that-the-frequency-error-exceeds-the-tolerance.patch ibmebus-change-probe-remove-interface-from-using-loc-code-to-dt-path.patch spin_lock_unlocked-cleanup-in-arch-powerpc.patch slub-treat-slab_hwcache_align-as-a-mininum-and-not-as-the-alignment.patch the-scheduled-removal-of-obsolete_oss-options.patch drivers-macintosh-mac_hidc-make-code-static.patch fixes-and-cleanups-for-earlyprintk-aka-boot-console.patch parport-dev-driver-model-support-powerpc-fix.patch use-slab_panic-flag-cleanup.patch atomich-add-atomic64-cmpxchg-xchg-and-add_unless-to-powerpc.patch atomich-add-atomic64-cmpxchg-xchg-and-add_unless-to-powerpc-fix.patch local_t-powerpc-extension.patch linux-kernel-markers-powerpc-optimization.patch ps3fb-thread-updates.patch ps3av-thread-updates.patch ps3fb-kill-superfluous-zero-initializations.patch ps3av-misc-updates.patch aty128fb-fix-blanking.patch radeonfb-add-support-for-radeon-xpress-200m.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