X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=mm%2Fnommu.c;h=b989cb928a7cf29ec5ad66ff519f80633bfe8129;hb=313d8e57b074d5f03dfed2755f21ae41a6f0fd5a;hp=42fb84e9e8152819701d3da1cd449c30a0466db0;hpb=c548f08a4f7b89b93c805e0c4024b8302afa7121;p=linux-2.6 diff --git a/mm/nommu.c b/mm/nommu.c index 42fb84e9e8..b989cb928a 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -12,6 +12,7 @@ * Copyright (c) 2002 Greg Ungerer */ +#include #include #include #include @@ -175,7 +176,8 @@ EXPORT_SYMBOL(vfree); void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot) { /* - * kmalloc doesn't like __GFP_HIGHMEM for some reason + * You can't specify __GFP_HIGHMEM with kmalloc() since kmalloc() + * returns only a logical address. */ return kmalloc(size, (gfp_mask | __GFP_COMP) & ~__GFP_HIGHMEM); } @@ -827,6 +829,9 @@ unsigned long do_mmap_pgoff(struct file *file, void *result; int ret; + 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,