Commit 5a8130f2 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Linus Torvalds
Browse files

get_unmapped_area handles MAP_FIXED on i386

Handle MAP_FIXED in i386 hugetlb_get_unmapped_area(), just call
Signed-off-by: default avatarBenjamin Herrenschmidt <>
Acked-by: default avatarWilliam Irwin <>
Cc: Andi Kleen <>
Cc: Adam Litke <>
Cc: David Gibson <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 2fd3beba
......@@ -367,6 +367,12 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
if (len > TASK_SIZE)
return -ENOMEM;
if (flags & MAP_FIXED) {
if (prepare_hugepage_range(addr, len, pgoff))
return -EINVAL;
return addr;
if (addr) {
addr = ALIGN(addr, HPAGE_SIZE);
vma = find_vma(mm, addr);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment