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>
This commit is contained in:

committed by
Michael Ellerman

parent
82228e362f
commit
fbfef9027c
@@ -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))
|
||||
|
Reference in New Issue
Block a user