Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166193
b: refs/heads/master
c: 06aab5a
h: refs/heads/master
i:
  166191: 1b8b872
v: v3
  • Loading branch information
David Howells authored and Linus Torvalds committed Sep 25, 2009
1 parent 3b80f2a commit c5284f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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: 934831d060ccd5471ecbc562804a8d3ccd6e562c
refs/heads/master: 06aab5a3084e1d825384fa353e6df4c7949c8683
8 changes: 4 additions & 4 deletions trunk/mm/nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ static int validate_mmap_request(struct file *file,
int ret;

/* do the simple checks first */
if (flags & MAP_FIXED || addr) {
if (flags & MAP_FIXED) {
printk(KERN_DEBUG
"%d: Can't do fixed-address/overlay mmap of RAM\n",
current->pid);
Expand Down Expand Up @@ -1182,9 +1182,6 @@ unsigned long do_mmap_pgoff(struct file *file,

kenter(",%lx,%lx,%lx,%lx,%lx", addr, len, prot, flags, pgoff);

if (!(flags & MAP_FIXED))
addr = round_hint_to_min(addr);

/* decide whether we should attempt the mapping, and if so what sort of
* mapping */
ret = validate_mmap_request(file, addr, len, prot, flags, pgoff,
Expand All @@ -1194,6 +1191,9 @@ unsigned long do_mmap_pgoff(struct file *file,
return ret;
}

/* we ignore the address hint */
addr = 0;

/* we've determined that we can make the mapping, now translate what we
* now know into VMA flags */
vm_flags = determine_vm_flags(file, prot, flags, capabilities);
Expand Down

0 comments on commit c5284f9

Please sign in to comment.