Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72789
b: refs/heads/master
c: 098362e
h: refs/heads/master
i:
  72787: b38f694
v: v3
  • Loading branch information
David Daney authored and Ralf Baechle committed Oct 29, 2007
1 parent 608ff95 commit ee249b5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c4e8308c30b0139f89bac71f3c22c8d7413b8665
refs/heads/master: 098362e72002d01fdd18afee2e635ffdcdc89e2c
9 changes: 7 additions & 2 deletions trunk/arch/mips/kernel/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,14 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,

task_size = STACK_TOP;

if (len > task_size)
return -ENOMEM;

if (flags & MAP_FIXED) {
/* Even MAP_FIXED mappings must reside within task_size. */
if (task_size - len < addr)
return -EINVAL;

/*
* We do not accept a shared mapping if it would violate
* cache aliasing constraints.
Expand All @@ -83,8 +90,6 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
return addr;
}

if (len > task_size)
return -ENOMEM;
do_color_align = 0;
if (filp || (flags & MAP_SHARED))
do_color_align = 1;
Expand Down

0 comments on commit ee249b5

Please sign in to comment.