]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Fix sparc64 MAP_FIXED handling of framebuffer mmaps
authorChris Wright <chrisw@sous-sol.org>
Wed, 24 Oct 2007 05:44:38 +0000 (22:44 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 16 Nov 2007 16:22:56 +0000 (08:22 -0800)
patch d58aa8c7b1cc0add7b03e26bdb8988d98d2f4cd1 in mainline.

From: Chris Wright <chrisw@sous-sol.org>
Date: Tue, 23 Oct 2007 20:36:14 -0700
Subject: [PATCH] [SPARC64]: pass correct addr in get_fb_unmapped_area(MAP_FIXED)

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/sparc64/kernel/sys_sparc.c

index d108eeb0734fe2fe3586d01a8c2e2fdf5aaf25e4..6bf7bcdbaf3c2c0accc3346864b24481c4f12f52 100644 (file)
@@ -319,7 +319,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;