Re: [PATCH 12/14] get_unmapped_area handles MAP_FIXED in /dev/mem (nommu)

David Howells
2007-04-04T10:31:09Z

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

> + if (flags & MAP_FIXED)
> + if ((addr >> PAGE_SHIFT) != pgoff)
> + return (unsigned long) -EINVAL;

Again... in NOMMU-mode there is no MAP_FIXED - it's rejected before we get
this far.

> - return pgoff;
> + return pgoff << PAGE_SHIFT;

That, however, does appear to be a genuine bugfix.

David