From: Chris Wright Date: Wed, 24 Oct 2007 05:44:38 +0000 (-0700) Subject: Fix sparc64 MAP_FIXED handling of framebuffer mmaps X-Git-Tag: v2.6.23.3~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efd233a45eed8688d5d5b02f56610b0abf2474cc;p=thirdparty%2Fkernel%2Fstable.git Fix sparc64 MAP_FIXED handling of framebuffer mmaps patch d58aa8c7b1cc0add7b03e26bdb8988d98d2f4cd1 in mainline. From: Chris Wright 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c index d108eeb0734fe..6bf7bcdbaf3c2 100644 --- a/arch/sparc64/kernel/sys_sparc.c +++ b/arch/sparc64/kernel/sys_sparc.c @@ -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;