From: Benjamin Herrenschmidt Date: Sun, 6 May 2007 21:50:11 +0000 (-0700) Subject: get_unmapped_area handles MAP_FIXED on x86_64 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=11300a64d08ebce03e30cac8eb58e8ce008e4bb7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git get_unmapped_area handles MAP_FIXED on x86_64 Handle MAP_FIXED in x86_64 arch_get_unmapped_area(), simple case, just return the address as passed in Signed-off-by: Benjamin Herrenschmidt Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/x86_64/kernel/sys_x86_64.c b/arch/x86_64/kernel/sys_x86_64.c index 76bf7c241fe4..f891931eb753 100644 --- a/arch/x86_64/kernel/sys_x86_64.c +++ b/arch/x86_64/kernel/sys_x86_64.c @@ -93,6 +93,9 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long start_addr; unsigned long begin, end; + if (flags & MAP_FIXED) + return addr; + find_start_end(flags, &begin, &end); if (len > end)