From: Chris Wright Date: Wed, 24 Oct 2007 03:36:14 +0000 (-0700) Subject: [SPARC64]: pass correct addr in get_fb_unmapped_area(MAP_FIXED) X-Git-Tag: firefly_0821_release~24604^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d58aa8c7b1cc0add7b03e26bdb8988d98d2f4cd1;p=firefly-linux-kernel-4.4.55.git [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 --- diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c index 560cb1edb1d0..c56573a10eee 100644 --- a/arch/sparc64/kernel/sys_sparc.c +++ b/arch/sparc64/kernel/sys_sparc.c @@ -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;