powerpc/mm/radix: Use mm->task_size for boundary checking instead of addr_limit
[linux-2.6-block.git] / arch / powerpc / mm / subpage-prot.c
index a409f78d206bf47936a366ee05540441474e2342..e94fbd4c88458aa5953a271b1ef1eac0ef5c5c66 100644 (file)
@@ -197,8 +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 >= mm->context.addr_limit || len >= mm->context.addr_limit ||
-           addr + len > mm->context.addr_limit)
+           addr >= mm->task_size || len >= mm->task_size ||
+           addr + len > mm->task_size)
                return -EINVAL;
 
        if (is_hugepage_only_range(mm, addr, len))