Commit 8b4b205c authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

[PATCH] fix return value after hugetlb mmap failure

At the moment no one uses is_aligned_hugepage_range or is_hugepage_only_range,
but it is reasonable to assume they return true or false.

On error we want to return -EINVAL back to userspace.
parent 80e8e672
......@@ -846,7 +846,7 @@ get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
ret = is_hugepage_only_range(addr, len);
}
if (ret)
return ret;
return -EINVAL;
return 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