Commit:     8a93258ce302c2b597289770cb7de8dba7c6c219
Parent:     112654208bd6f092e064973b8fa680e37ffa74a6
Author:     Benjamin Herrenschmidt <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 16 22:53:16 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Apr 17 16:36:27 2007 -0700

    fix bogon in /dev/mem mmap'ing on nommu
    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 <[EMAIL PROTECTED]>
    Acked-By: David Howells <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 drivers/char/mem.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index f5c160c..5f06696 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -248,7 +248,7 @@ static unsigned long get_unmapped_area_mem(struct file 
        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 */
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to