]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
[SPARC64]: pass correct addr in get_fb_unmapped_area(MAP_FIXED)
authorChris Wright <chrisw@sous-sol.org>
Wed, 24 Oct 2007 03:36:14 +0000 (20:36 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 24 Oct 2007 05:42:07 +0000 (22:42 -0700)
Looks like the MAP_FIXED case is using the wrong address hint.  I'd
expect the comment "don't mess with it" means pass the request
straight on through, not change the address requested to -ENOMEM.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/sys_sparc.c

index 560cb1edb1d0d97df195827d88bcf8322450a7a8..c56573a10eee60d2080dbbd674acd6bf6f1bdd53 100644 (file)
@@ -318,7 +318,7 @@ unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, u
 
        if (flags & MAP_FIXED) {
                /* Ok, don't mess with it. */
-               return get_unmapped_area(NULL, addr, len, pgoff, flags);
+               return get_unmapped_area(NULL, orig_addr, len, pgoff, flags);
        }
        flags &= ~MAP_SHARED;