aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/hugetlbpage-radix.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2017-03-22 09:07:01 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2017-04-01 21:12:28 +1100
commitfbfef9027c2a7ad9277755509fdb849dbccfe8c1 (patch)
treef44258e7f2972d130c9fa4f80cdb969d0495f4f3 /arch/powerpc/mm/hugetlbpage-radix.c
parentpowerpc/pseries: Skip using reserved virtual address range (diff)
downloadlinux-dev-fbfef9027c2a7ad9277755509fdb849dbccfe8c1.tar.xz
linux-dev-fbfef9027c2a7ad9277755509fdb849dbccfe8c1.zip
powerpc/mm: Switch some TASK_SIZE checks to use mm_context addr_limit
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm/hugetlbpage-radix.c')
-rw-r--r--arch/powerpc/mm/hugetlbpage-radix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/mm/hugetlbpage-radix.c b/arch/powerpc/mm/hugetlbpage-radix.c
index 35254a678456..95207c117b82 100644
--- a/arch/powerpc/mm/hugetlbpage-radix.c
+++ b/arch/powerpc/mm/hugetlbpage-radix.c
@@ -52,7 +52,7 @@ radix__hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
if (len & ~huge_page_mask(h))
return -EINVAL;
- if (len > TASK_SIZE)
+ if (len > mm->context.addr_limit)
return -ENOMEM;
if (flags & MAP_FIXED) {
@@ -64,7 +64,7 @@ radix__hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
if (addr) {
addr = ALIGN(addr, huge_page_size(h));
vma = find_vma(mm, addr);
- if (TASK_SIZE - len >= addr &&
+ if (mm->context.addr_limit - len >= addr &&
(!vma || addr + len <= vma->vm_start))
return addr;
}