syscall.c (871039f02f8ec4ab2e5e9010718caa8e085786f1) syscall.c (c52d0d30aef84aa8893b34e5254716c8ab5c4472)
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995, 1996, 1997, 2000, 2001, 05 by Ralf Baechle
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 * Copyright (C) 2001 MIPS Technologies, Inc.

--- 65 unchanged lines hidden (view full) ---

74
75unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
76 unsigned long len, unsigned long pgoff, unsigned long flags)
77{
78 struct vm_area_struct * vmm;
79 int do_color_align;
80 unsigned long task_size;
81
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995, 1996, 1997, 2000, 2001, 05 by Ralf Baechle
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 * Copyright (C) 2001 MIPS Technologies, Inc.

--- 65 unchanged lines hidden (view full) ---

74
75unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
76 unsigned long len, unsigned long pgoff, unsigned long flags)
77{
78 struct vm_area_struct * vmm;
79 int do_color_align;
80 unsigned long task_size;
81
82 task_size = STACK_TOP;
82#ifdef CONFIG_32BIT
83 task_size = TASK_SIZE;
84#else /* Must be CONFIG_64BIT*/
85 task_size = test_thread_flag(TIF_32BIT_ADDR) ? TASK_SIZE32 : TASK_SIZE;
86#endif
83
84 if (len > task_size)
85 return -ENOMEM;
86
87 if (flags & MAP_FIXED) {
88 /* Even MAP_FIXED mappings must reside within task_size. */
89 if (task_size - len < addr)
90 return -EINVAL;

--- 321 unchanged lines hidden ---
87
88 if (len > task_size)
89 return -ENOMEM;
90
91 if (flags & MAP_FIXED) {
92 /* Even MAP_FIXED mappings must reside within task_size. */
93 if (task_size - len < addr)
94 return -EINVAL;

--- 321 unchanged lines hidden ---