From c5284f9aa76261516f2facb2fe8b0a26bf993f20 Mon Sep 17 00:00:00 2001 From: David Howells Date: Thu, 24 Sep 2009 12:33:48 +0100 Subject: [PATCH] --- yaml --- r: 166193 b: refs/heads/master c: 06aab5a3084e1d825384fa353e6df4c7949c8683 h: refs/heads/master i: 166191: 1b8b872a013893d8c5611b0eaafcf3b5994cee74 v: v3 --- [refs] | 2 +- trunk/mm/nommu.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 7dff2153a605..1eba9984ee1f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 934831d060ccd5471ecbc562804a8d3ccd6e562c +refs/heads/master: 06aab5a3084e1d825384fa353e6df4c7949c8683 diff --git a/trunk/mm/nommu.c b/trunk/mm/nommu.c index 6a002abcb58f..c73aa4753d79 100644 --- a/trunk/mm/nommu.c +++ b/trunk/mm/nommu.c @@ -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); @@ -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, @@ -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);