]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/mm: Fix mmap errno when MAP_FIXED is set and mapping exceeds the allowed...
authorjmarchan@redhat.com <jmarchan@redhat.com>
Wed, 15 Jan 2014 15:27:11 +0000 (16:27 +0100)
committerJiri Slaby <jslaby@suse.cz>
Tue, 2 Jun 2015 09:54:48 +0000 (11:54 +0200)
commitec61e07b4192d5bbc5fb3ef80d7e6e36e09ddf57
tree0089d44eafc9170eb369bc9338e50f8653fdef89
parentdd1723e681b0aa529cc43d404339232a55067ad2
powerpc/mm: Fix mmap errno when MAP_FIXED is set and mapping exceeds the allowed address space

commit 19751c07b3728748c1253627ce94e6906fa5e273 upstream.

According to Posix, if MAP_FIXED is specified mmap shall set ENOMEM if
the requested mapping exceeds the allowed range for address space of
the process. The generic code set it right, but the specific powerpc
slice_get_unmapped_area() function currently returns -EINVAL in that
case.
This patch corrects it.

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/powerpc/mm/slice.c