From: Benjamin Herrenschmidt Date: Sun, 6 May 2007 21:50:07 +0000 (-0700) Subject: get_unmapped_area handles MAP_FIXED on frv X-Git-Tag: v2.6.22-rc1~935 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2fd3bebaad9da3b3b99c46a3389099424bf7ee35;p=linux-2.6 get_unmapped_area handles MAP_FIXED on frv Handle MAP_FIXED in arch_get_unmapped_area on frv. Trivial case, just return the address. Signed-off-by: Benjamin Herrenschmidt Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/frv/mm/elf-fdpic.c b/arch/frv/mm/elf-fdpic.c index 9477ccce07..cac2c01a3a 100644 --- a/arch/frv/mm/elf-fdpic.c +++ b/arch/frv/mm/elf-fdpic.c @@ -64,6 +64,10 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi if (len > TASK_SIZE) return -ENOMEM; + /* handle MAP_FIXED */ + if (flags & MAP_FIXED) + return addr; + /* only honour a hint if we're not going to clobber something doing so */ if (addr) { addr = PAGE_ALIGN(addr);