Re: [PATCH 11/14] get_unmapped_area handles MAP_FIXED on ramfs (nommu)

David Howells
2007-04-04T10:17:12Z

Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> - if (!(flags & MAP_SHARED))
> + /* Deal with MAP_FIXED differently ? Forbid it ? Need help from some nommu
> + * folks there... --BenH.
> + */
> + if ((flags & MAP_FIXED) || !(flags & MAP_SHARED))

MAP_FIXED on NOMMU? Surely you jest...

See the first if-statement in validate_mmap_request().

If anything, you should be adding BUG_ON(flags & MAP_FIXED).

David