architecture specific and generic arch_get_unmapped_area() and arch_get_unmapped_area_topdown() check for TASK_SIZE before MAP_FIXED. It is safe to remove check for TASK_SIZE in get_unmapped_area(). Signed-off-by: Vladimir Murzin <murzin.v@xxxxxxxxx> --- mm/mmap.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index eae90af..6e6f934 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1544,10 +1544,6 @@ get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, if (error) return error; - /* Careful about overflows.. */ - if (len > TASK_SIZE) - return -ENOMEM; - get_area = current->mm->get_unmapped_area; if (file && file->f_op && file->f_op->get_unmapped_area) get_area = file->f_op->get_unmapped_area; -- 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html