diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2017-03-22 04:37:01 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-04-01 12:12:28 +0200 |
commit | fbfef9027c2a7ad9277755509fdb849dbccfe8c1 (patch) | |
tree | f44258e7f2972d130c9fa4f80cdb969d0495f4f3 /arch/powerpc/mm/subpage-prot.c | |
parent | powerpc/pseries: Skip using reserved virtual address range (diff) | |
download | linux-fbfef9027c2a7ad9277755509fdb849dbccfe8c1.tar.xz linux-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/subpage-prot.c')
-rw-r--r-- | arch/powerpc/mm/subpage-prot.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/mm/subpage-prot.c b/arch/powerpc/mm/subpage-prot.c index 94210940112f..a409f78d206b 100644 --- a/arch/powerpc/mm/subpage-prot.c +++ b/arch/powerpc/mm/subpage-prot.c @@ -197,7 +197,8 @@ long sys_subpage_prot(unsigned long addr, unsigned long len, u32 __user *map) /* Check parameters */ if ((addr & ~PAGE_MASK) || (len & ~PAGE_MASK) || - addr >= TASK_SIZE || len >= TASK_SIZE || addr + len > TASK_SIZE) + addr >= mm->context.addr_limit || len >= mm->context.addr_limit || + addr + len > mm->context.addr_limit) return -EINVAL; if (is_hugepage_only_range(mm, addr, len)) |